Add comment for memory tracker blocking

This commit is contained in:
Antonio Andelic 2022-08-04 07:13:42 +00:00
parent 56ca93ca3f
commit fa98338ce1

View File

@ -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();
}