From aff6b7a8d63aaf0d2897efe7aa26bc5191404465 Mon Sep 17 00:00:00 2001 From: alesapin Date: Sun, 12 Jun 2022 00:01:41 +0200 Subject: [PATCH] Fix keeper storage --- src/Coordination/KeeperStorage.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Coordination/KeeperStorage.cpp b/src/Coordination/KeeperStorage.cpp index f23394e09ee..e47a0905194 100644 --- a/src/Coordination/KeeperStorage.cpp +++ b/src/Coordination/KeeperStorage.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include namespace DB { @@ -365,7 +365,7 @@ struct KeeperStorageCreateRequestProcessor final : public KeeperStorageRequestPr if (zxid > parent.stat.pzxid) parent.stat.pzxid = zxid; - assert(parent.stat.numChildren == static_cast(parent.getChildren().size())); + chassert(parent.stat.numChildren == static_cast(parent.getChildren().size())); }); response.path_created = path_created; @@ -387,7 +387,7 @@ struct KeeperStorageCreateRequestProcessor final : public KeeperStorageRequestPr undo_parent.stat.cversion = prev_parent_cversion; undo_parent.stat.pzxid = prev_parent_zxid; undo_parent.removeChild(child_path); - assert(undo_parent.stat.numChildren == static_cast(undo_parent.getChildren().size())); + chassert(undo_parent.stat.numChildren == static_cast(undo_parent.getChildren().size())); }); storage.container.erase(path_created); @@ -522,7 +522,7 @@ struct KeeperStorageRemoveRequestProcessor final : public KeeperStorageRequestPr --parent.stat.numChildren; ++parent.stat.cversion; parent.removeChild(child_basename); - assert(parent.stat.numChildren == static_cast(parent.getChildren().size())); + chassert(parent.stat.numChildren == static_cast(parent.getChildren().size())); }); response.error = Coordination::Error::ZOK; @@ -544,7 +544,7 @@ struct KeeperStorageRemoveRequestProcessor final : public KeeperStorageRequestPr ++parent.stat.numChildren; --parent.stat.cversion; parent.addChild(child_name); - assert(parent.stat.numChildren == static_cast(parent.getChildren().size())); + chassert(parent.stat.numChildren == static_cast(parent.getChildren().size())); }); }; } @@ -1115,7 +1115,7 @@ KeeperStorage::ResponsesForSessions KeeperStorage::processRequest(const Coordina ++parent.stat.cversion; auto base_name = getBaseName(ephemeral_path); parent.removeChild(base_name); - assert(parent.stat.numChildren == static_cast(parent.getChildren().size())); + chassert(parent.stat.numChildren == static_cast(parent.getChildren().size())); }); container.erase(ephemeral_path);