MCPcopy Create free account
hub / github.com/documentdb/documentdb / GetCollectionBloatEstimate

Function GetCollectionBloatEstimate

pg_documentdb/src/utils/storage_utils.c:167–178  ·  view source on GitHub ↗

* Gets the bloat stats for a given collectionId across all shards. */

Source from the content-addressed store, hash-verified

165 * Gets the bloat stats for a given collectionId across all shards.
166 */
167CollectionBloatStats
168GetCollectionBloatEstimate(uint64 collectionId)
169{
170 int numValues = 1;
171 Datum values[1] = { UInt64GetDatum(collectionId) };
172 Oid types[1] = { INT8OID };
173 List *workerBsons = RunQueryOnAllServerNodes("BloatStats", values, types, numValues,
174 get_bloat_stats_worker,
175 ApiInternalSchemaNameV2,
176 "get_bloat_stats_worker");
177 return MergeBloatStatsBsons(workerBsons);
178}
179
180
181/*

Callers 1

command_compactFunction · 0.85

Calls 2

RunQueryOnAllServerNodesFunction · 0.85
MergeBloatStatsBsonsFunction · 0.85

Tested by

no test coverage detected