Symptoms: all threads in BackgroundScheduledPool busy, lot of tasks in replication queue, none of the tasks is executing. 

![Screenshot from 2021-04-16 16-21-44_](https://user-images.githubusercontent.com/1549571/115193796-e767d600-a0ec-11eb-887c-5c9c2412e50c.png)

Related to #16895

Possible workarounds (poor options): increasing the background_schedule_pool_size to huge values, or restart server every time when that happens etc. - 

}
        }
        break;
        case EntryState::SYNC_DESTINATION:
        {
            {
                
                Coordination::Requests ops;
                ops.emplace_back(zkutil::makeCheckRequest(entry.znode_path, entry.version));
                ReplicatedMergeTreeLogEntryData log_entry;
                log_entry.type = ReplicatedMergeTreeLogEntryData::SYNC_PINNED_PART_UUIDS;
                log_entry.create_time = std::time(nullptr);
                log_entry.source_replica = storage.replica_name;
                log_entry.source_shard = zookeeper_path;
                ops.emplace_back(zkutil::makeSetRequest(entry.to_shard + "/log", "", -1));
                ops.emplace_back(zkutil::makeCreateRequest(
                    entry.to_shard + "/log/log-", log_entry.toString(), zkutil::CreateMode::PersistentSequential));
                Coordination::Responses responses;
                Coordination::Error rc = zk->tryMulti(ops, responses);
                zkutil::KeeperMultiException::check(rc, ops, responses);
                String log_znode_path = dynamic_cast<const Coordination::CreateResponse &>(*responses.back()).path_created;
                log_entry.znode_name = log_znode_path.substr(log_znode_path.find_last_of('/') + 1);
                storage.waitForAllTableReplicasToProcessLogEntry(entry.to_shard, log_entry, true);
            }
            {
                
                Entry entry_copy = entry;
                entry_copy.state = EntryState::DESTINATION_FETCH;
                entry_copy.update_time = std::time(nullptr);
                zk->set(entry_copy.znode_path, entry_copy.toString(), entry_copy.version);