MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / removeRecursive

Function removeRecursive

programs/keeper-bench/Runner.cpp:1496–1518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1494}
1495
1496void removeRecursive(Coordination::ZooKeeper & zookeeper, const std::string & path, bool allow_native)
1497{
1498 if (allow_native && zookeeper.isFeatureEnabled(DB::KeeperFeatureFlag::REMOVE_RECURSIVE))
1499 {
1500 auto promise = std::make_shared<std::promise<Coordination::Error>>();
1501 auto future = promise->get_future();
1502 zookeeper.removeRecursive(path, /*remove_nodes_limit=*/ 100000000,
1503 [promise](const Coordination::RemoveRecursiveResponse & response)
1504 {
1505 promise->set_value(response.error);
1506 });
1507 auto error = future.get();
1508 if (error == Coordination::Error::ZNONODE)
1509 return;
1510 if (error != Coordination::Error::ZOK)
1511 throw zkutil::KeeperException(error, "Failed to recursively remove {}", path);
1512 return;
1513 }
1514
1515 Coordination::Requests batch;
1516 removeRecursiveManual(zookeeper, path, batch);
1517 flushMulti(zookeeper, batch);
1518}
1519
1520}
1521

Callers 4

startupMethod · 0.85
cleanupMethod · 0.85
removeSharedRecursiveMethod · 0.85

Calls 7

KeeperExceptionClass · 0.85
removeRecursiveManualFunction · 0.85
flushMultiFunction · 0.85
set_valueMethod · 0.80
isFeatureEnabledMethod · 0.45
removeRecursiveMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected