mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-01 12:01:58 +00:00
Add comment for memory tracker blocking
This commit is contained in:
parent
56ca93ca3f
commit
fa98338ce1
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user