diff --git a/src/Coordination/KeeperServer.cpp b/src/Coordination/KeeperServer.cpp index a7c9b0836f1..6e017e36919 100644 --- a/src/Coordination/KeeperServer.cpp +++ b/src/Coordination/KeeperServer.cpp @@ -176,6 +176,11 @@ struct KeeperServer::KeeperRaftServer : public nuraft::raft_server void commit_in_bg() override { + // For NuRaft, if any commit fails (uncaught exception) the whole server aborts as a safety + // This includes failed allocation which can produce an unknown state for the storage, + // making it impossible to handle correctly. + // We block the memory tracker for all the commit operations (including KeeperStateMachine::commit) + // assuming that the allocations are small MemoryTrackerBlockerInThread blocker; nuraft::raft_server::commit_in_bg(); }