From 70f436483c295eea0ab4ebed481da8fd80fb50d7 Mon Sep 17 00:00:00 2001 From: Han Fei Date: Tue, 5 Dec 2023 00:40:15 +0100 Subject: [PATCH] address part of comments --- src/Coordination/KeeperDispatcher.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Coordination/KeeperDispatcher.cpp b/src/Coordination/KeeperDispatcher.cpp index 544f4e033bb..1299e9c9f20 100644 --- a/src/Coordination/KeeperDispatcher.cpp +++ b/src/Coordination/KeeperDispatcher.cpp @@ -56,7 +56,9 @@ namespace bool checkIfRequestIncreaseMem(const Coordination::ZooKeeperRequestPtr & request) { - if (request->getOpNum() == Coordination::OpNum::Create || request->getOpNum() == Coordination::OpNum::CreateIfNotExists) + if (request->getOpNum() == Coordination::OpNum::Create + || request->getOpNum() == Coordination::OpNum::CreateIfNotExists + || request->getOpNum() == Coordination::OpNum::Set) { return true; } @@ -76,6 +78,12 @@ bool checkIfRequestIncreaseMem(const Coordination::ZooKeeperRequestPtr & request memory_delta += create_req.bytesSize(); break; } + case Coordination::OpNum::Set: + { + Coordination::ZooKeeperSetRequest & set_req = dynamic_cast(*sub_zk_request); + memory_delta += set_req.bytesSize(); + break; + } case Coordination::OpNum::Remove: { Coordination::ZooKeeperRemoveRequest & remove_req = dynamic_cast(*sub_zk_request);