diff --git a/src/Common/ZooKeeper/TestKeeper.cpp b/src/Common/ZooKeeper/TestKeeper.cpp index 3982971163c..2fbe9110b6b 100644 --- a/src/Common/ZooKeeper/TestKeeper.cpp +++ b/src/Common/ZooKeeper/TestKeeper.cpp @@ -368,6 +368,8 @@ std::pair TestKeeperRemoveRecursiveRequest::process(TestKeepe if (child_path.starts_with(path)) children.emplace_back(child_path, child_node); + else + break; } if (children.size() > remove_nodes_limit)