From 01082d03d235be80d5127d3b80347ef1d7ab120e Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 25 Aug 2018 01:55:02 +0300 Subject: [PATCH] Adopted logic in ReplicatedMergeTreeBlockOutputStream #2949 --- .../MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp b/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp index 51a1df695da..9f61d267aa0 100644 --- a/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp +++ b/dbms/src/Storages/MergeTree/ReplicatedMergeTreeBlockOutputStream.cpp @@ -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);