diff --git a/src/coordination/coordinator_instance.cpp b/src/coordination/coordinator_instance.cpp index acc39dff5..46a32bb60 100644 --- a/src/coordination/coordinator_instance.cpp +++ b/src/coordination/coordinator_instance.cpp @@ -65,7 +65,8 @@ CoordinatorInstance::CoordinatorInstance() }); }, [this]() { - spdlog::info("Leader changed, stopping all replication instances!"); + spdlog::info("Leader changed, trying to stop all replication instances!"); + /// TODO Add to pool auto lock = std::lock_guard{coord_instance_lock_}; // RAII repl_instances_.clear(); spdlog::info("Leader changed, stopped all replication instances!"); @@ -218,14 +219,14 @@ auto CoordinatorInstance::TryFailover() -> void { spdlog::warn("Failover failed since promoting replica to main failed!"); return; } - spdlog::info("Leader changed, stopping all replication instances!"); + spdlog::info("Promote to main done, trying to append update uuid"); // TODO (antoniofilipovic) : This can fail and we don't know we change uuid if (!raft_state_.AppendUpdateUUIDLog(new_main_uuid)) { return; } auto const new_main_instance_name = new_main->InstanceName(); - + spdlog::info("Promote to main done, trying to set instance as main log"); // TODO (antoniofilipovic): This can fail and we don't know we have set up new MAIN if (!raft_state_.AppendSetInstanceAsMainLog(new_main_instance_name)) { return; diff --git a/src/storage/v2/replication/replication_client.cpp b/src/storage/v2/replication/replication_client.cpp index bd2c2cc7d..cbba5af83 100644 --- a/src/storage/v2/replication/replication_client.cpp +++ b/src/storage/v2/replication/replication_client.cpp @@ -265,8 +265,6 @@ void ReplicationStorageClient::RecoverReplica(uint64_t replica_commit, memgraph: spdlog::debug("Starting replica recovery"); auto *mem_storage = static_cast(storage); - // TODO(antoniofilipovic): Can we get stuck here in while loop if replica commit timestamp is not updated when using - // only snapshot while (true) { auto file_locker = mem_storage->file_retainer_.AddLocker();