MCPcopy Create free account
hub / github.com/deepseek-ai/3FS / queryTotalChunks

Function queryTotalChunks

tests/meta/MetaTestBase.cc:286–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286CoTryTask<size_t> queryTotalChunks(storage::client::StorageClient &storage, client::ICommonMgmtdClient &mgmtd) {
287 ChunkId begin(InodeId(0), 0, 0), end(InodeId(-1), 0, 0);
288 auto routing = mgmtd.getRoutingInfo();
289 EXPECT_TRUE(routing);
290 size_t total = 0;
291 for (const auto &chain : routing->raw()->chains) {
292 auto query =
293 storage.createQueryOp(chain.first, storage::ChunkId(begin.pack()), storage::ChunkId(end.pack()), UINT32_MAX);
294 CO_RETURN_ON_ERROR(co_await storage.queryLastChunk(std::span(&query, 1), {}));
295 total += query.result.totalNumChunks;
296 }
297 co_return total;
298}
299
300CoTryTask<void> printTree(MetaOperator &meta) {
301 auto queue = std::queue<std::pair<InodeId, Path>>();

Callers 2

TYPED_TESTFunction · 0.85
TYPED_TESTFunction · 0.85

Calls 7

InodeIdClass · 0.85
rawMethod · 0.80
createQueryOpMethod · 0.80
ChunkIdClass · 0.50
getRoutingInfoMethod · 0.45
packMethod · 0.45
queryLastChunkMethod · 0.45

Tested by

no test coverage detected