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

Function IndexStatsCoordinator

pg_documentdb/src/aggregation/index_stats.c:101–116  ·  view source on GitHub ↗

* The implementation of indexStats on the query coordinator. */

Source from the content-addressed store, hash-verified

99 * The implementation of indexStats on the query coordinator.
100 */
101static void
102IndexStatsCoordinator(Datum databaseName, Datum collectionName,
103 MongoCollection *collection, Tuplestorestate *tupleStore,
104 TupleDesc tupleDescriptor)
105{
106 List *workerBsons = NIL;
107 int numValues = 2;
108 Datum values[2] = { databaseName, collectionName };
109 Oid types[2] = { TEXTOID, TEXTOID };
110 workerBsons = RunQueryOnAllServerNodes("IndexStats", values, types, numValues,
111 command_index_stats_worker,
112 ApiInternalSchemaName, "index_stats_worker");
113
114 /* Now that we have the worker BSON results, merge them to the final one */
115 MergeWorkerResults(collection, workerBsons, tupleStore, tupleDescriptor);
116}
117
118
119/*

Callers 1

Calls 2

RunQueryOnAllServerNodesFunction · 0.85
MergeWorkerResultsFunction · 0.70

Tested by

no test coverage detected