From 203276dfcc40b9d4f2b19a1eb0af430e612e8949 Mon Sep 17 00:00:00 2001 From: Konstantin Bogdanov Date: Fri, 21 Apr 2023 15:18:39 +0200 Subject: [PATCH] Use `storage.uncommited_state` --- src/Coordination/KeeperStorage.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Coordination/KeeperStorage.cpp b/src/Coordination/KeeperStorage.cpp index 8bfe1e667b4..308f6dcf815 100644 --- a/src/Coordination/KeeperStorage.cpp +++ b/src/Coordination/KeeperStorage.cpp @@ -918,12 +918,14 @@ struct KeeperStorageCreateRequestProcessor final : public KeeperStorageRequestPr std::vector new_deltas; if (zk_request->getOpNum() == Coordination::OpNum::CreateIfNotExists) { - auto & container = storage.container; - auto node_it = container.find(request.path); - if (node_it != container.end()) - { + // auto & container = storage.container; + // auto node_it = container.find(request.path); + // if (node_it != container.end()) + // { + // return new_deltas; + // } + if (storage.uncommitted_state.getNode(request.path) != nullptr) return new_deltas; - } } auto parent_path = parentPath(request.path);