mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Adopted logic in ReplicatedMergeTreeBlockOutputStream #2949
This commit is contained in:
parent
cc56235ad9
commit
01082d03d2
@ -310,13 +310,10 @@ void ReplicatedMergeTreeBlockOutputStream::commitPart(zkutil::ZooKeeperPtr & zoo
|
||||
block_number_lock->assumeUnlocked();
|
||||
}
|
||||
else if (multi_code == ZooKeeperImpl::ZooKeeper::ZCONNECTIONLOSS
|
||||
|| multi_code == ZooKeeperImpl::ZooKeeper::ZOPERATIONTIMEOUT
|
||||
|| multi_code == ZooKeeperImpl::ZooKeeper::ZSESSIONEXPIRED)
|
||||
|| multi_code == ZooKeeperImpl::ZooKeeper::ZOPERATIONTIMEOUT)
|
||||
{
|
||||
/** If the connection is lost, and we do not know if the changes were applied, we can not delete the local part
|
||||
* if the changes were applied, the inserted block appeared in `/blocks/`, and it can not be inserted again.
|
||||
*
|
||||
* NOTE that in contrast to original libzookeeper, in our library we may also get ZSESSIONEXPIRED in this case.
|
||||
*/
|
||||
transaction.commit();
|
||||
storage.enqueuePartForCheck(part->name, MAX_AGE_OF_LOCAL_PART_THAT_WASNT_ADDED_TO_ZOOKEEPER);
|
||||
|
Loading…
Reference in New Issue
Block a user