mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Fix snapshot sync
This commit is contained in:
parent
5a86371b02
commit
190339c4e6
@ -2609,8 +2609,15 @@ void KeeperStorage<Container>::preprocessRequest(
|
||||
else
|
||||
{
|
||||
if (last_zxid == new_last_zxid && digest && checkDigest(*digest, current_digest))
|
||||
// we found the preprocessed request with the same ZXID, we can skip it
|
||||
{
|
||||
auto & last_transaction = uncommitted_transactions.back();
|
||||
// we found the preprocessed request with the same ZXID, we can get log_idx and skip preprocessing it
|
||||
chassert(last_transaction.zxid == new_last_zxid && log_idx != 0);
|
||||
/// initially leader preprocessed without knowing the log idx
|
||||
/// on the second call we have that information and can set the log idx for the correct transaction
|
||||
last_transaction.log_idx = log_idx;
|
||||
return;
|
||||
}
|
||||
|
||||
if (new_last_zxid <= last_zxid)
|
||||
throw Exception(
|
||||
|
Loading…
Reference in New Issue
Block a user