Merge pull request #43663 from ClickHouse/fix-flaky-keeper-recovery

Fix data race in `Keeper` snapshot
This commit is contained in:
Antonio Andelic 2022-11-26 18:59:54 +01:00 committed by GitHub
commit 080618a91e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,6 +194,9 @@ void KeeperStorageSnapshot::serialize(const KeeperStorageSnapshot & snapshot, Wr
// write only the root system path because of digest
if (Coordination::matchPath(path.toView(), keeper_system_path) == Coordination::PathMatchResult::IS_CHILD)
{
if (counter == snapshot.snapshot_container_size - 1)
break;
++it;
continue;
}