Merge pull request #58598 from ClickHouse/keeper-small-fix

Small fix in Keeper
This commit is contained in:
Antonio Andelic 2024-01-08 17:07:16 +01:00 committed by GitHub
commit 4640049b4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -630,6 +630,10 @@ nuraft::cb_func::ReturnCode KeeperServer::callbackFunc(nuraft::cb_func::Type typ
const auto preprocess_logs = [&]
{
auto lock = raft_instance->lockRaft();
if (keeper_context->local_logs_preprocessed)
return;
keeper_context->local_logs_preprocessed = true;
auto log_store = state_manager->load_log_store();
auto log_entries = log_store->log_entries(state_machine->last_commit_index() + 1, log_store->next_slot());