https://clickhouse-test-reports.s3.yandex.net/22117/b7622868fc03a76769180f95459137c3ca1c091b/stress_test_(undefined).html#fail1

```
2021.03.25 16:16:53.828028 [ 321 ] {} <Error> test_rcfwsq.dst (962cd8fa-67e2-4fea-8bf3-aa51a9c60b96): ReplicatedMergeTreeQueue::SelectedEntryPtr DB::StorageReplicatedMergeTree::selectQueueEntry(): Code: 49, e.displayText() = DB::Exception: Tagging already tagged future part 1_50_50_0. This is a bug., Stack trace (when copying this message, always include the lines below):

0. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/exception:133: Poco::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) @ 0x1c518af2 in /usr/bin/clickhouse
1. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:57: DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xe8f4a9e in /usr/bin/clickhouse
2. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/ReplicatedMergeTreeQueue.cpp:0: DB::ReplicatedMergeTreeQueue::CurrentlyExecuting::CurrentlyExecuting(std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry> const&, DB::ReplicatedMergeTreeQueue&) @ 0x1b3ad3ee in /usr/bin/clickhouse
3. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:1229: DB::ReplicatedMergeTreeQueue::selectEntryToProcess(DB::MergeTreeDataMergerMutator&, DB::MergeTreeData&) @ 0x1b3ae628 in /usr/bin/clickhouse
4. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:0: DB::StorageReplicatedMergeTree::selectQueueEntry() @ 0x1af08644 in /usr/bin/clickhouse
5. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:2805: DB::StorageReplicatedMergeTree::getDataProcessingJob() @ 0x1af08a9e in /usr/bin/clickhouse
6. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/BackgroundJobsExecutor.cpp:207: DB::BackgroundJobsExecutor::getBackgroundJob() @ 0x1b0e8262 in /usr/bin/clickhouse
7. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/optional:295: DB::IBackgroundJobExecutor::jobExecutingTask() @ 0x1b0e6f0d in /usr/bin/clickhouse
8. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:0: DB::BackgroundSchedulePoolTaskInfo::execute() @ 0x1a16f2c7 in /usr/bin/clickhouse
9. ./obj-x86_64-linux-gnu/../src/Core/BackgroundSchedulePool.cpp:0: DB::BackgroundSchedulePool::threadFunction() @ 0x1a17118f in /usr/bin/clickhouse
10. ./obj-x86_64-linux-gnu/../src/Core/BackgroundSchedulePool.cpp:0: decltype(std::__1::forward<DB::BackgroundSchedulePool::BackgroundSchedulePool(unsigned long, unsigned long, char const*)::$_1>(fp)()) std::__1::__invoke<ThreadFromGlobalPool::ThreadFromGlobalPool<DB::BackgroundSchedulePool::BackgroundSchedulePool(unsigned long, unsigned long, char const*)::$_1>(DB::BackgroundSchedulePool::BackgroundSchedulePool(unsigned long, unsigned long, char const*)::$_1&&)::'lambda'()&>(DB::BackgroundSchedulePool::BackgroundSchedulePool(unsigned long, unsigned long, char const*)::$_1&&) @ 0x1a171b61 in /usr/bin/clickhouse
11. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2533: ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0xe945dbf in /usr/bin/clickhouse
12. ./obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:0: void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void ThreadPoolImpl<std::__1::thread>::scheduleImpl<void>(std::__1::function<void ()>, int, std::__1::optional<unsigned long>)::'lambda1'()> >(void*) @ 0xe949a96 in /usr/bin/clickhouse
13. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
14. clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
 (version 21.4.1.6343)
 ```
std::lock_guard state_lock(state_mutex);
                for (size_t copied_entry_idx = 0, num_copied_entries = copied_entries.size(); copied_entry_idx < num_copied_entries; ++copied_entry_idx)
                {
                    String path_created = dynamic_cast<const Coordination::CreateResponse &>(*responses[copied_entry_idx]).path_created;
                    copied_entries[copied_entry_idx]->znode_name = path_created.substr(path_created.find_last_of('/') + 1);
                    std::optional<time_t> unused = false;
                    insertUnlocked(copied_entries[copied_entry_idx], unused, state_lock);
                }
                last_queue_update = time(nullptr);
            }
            catch (...)
            {
                tryLogCurrentException(log);
                
                
                std::terminate();
            }
            if (!copied_entries.empty())
            {
                LOG_DEBUG(log, "Pulled {} entries to queue.", copied_entries.size());
                merge_strategy_picker.refreshState();
            }
        }
        storage.background_executor.triggerTask();
    }
    return stat.version;
}
namespace
{
Names getPartNamesToMutate(