Update some comment in src/backend/distributed/metadata/metadata_utility.c

Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
remotes/c2main/clean-6496
Cédric Villemain 2023-10-26 12:28:21 +02:00 committed by Cédric Villemain
parent 6dfc402ace
commit 23235fb848
1 changed files with 7 additions and 5 deletions

View File

@ -335,6 +335,8 @@ citus_table_size(PG_FUNCTION_ARGS)
/* /*
* citus_relation_size accept a relation name and returns a relation's 'main' * citus_relation_size accept a relation name and returns a relation's 'main'
* fork's size. * fork's size.
*
* Input relation is allowed to be an index on a distributed table too.
*/ */
Datum Datum
citus_relation_size(PG_FUNCTION_ARGS) citus_relation_size(PG_FUNCTION_ARGS)
@ -513,7 +515,8 @@ ReceiveShardIdAndSizeResults(List *connectionList, Tuplestorestate *tupleStore,
* index belonging to a distributed table and size query can be run on it. * index belonging to a distributed table and size query can be run on it.
* Connection to each node has to be established to get the size of the * Connection to each node has to be established to get the size of the
* relation. * relation.
*/ * Input relation is allowed to be an index on a distributed table too.
*/
static bool static bool
DistributedRelationSize(Oid relationId, SizeQueryType sizeQueryType, DistributedRelationSize(Oid relationId, SizeQueryType sizeQueryType,
bool failOnError, uint64 *relationSize) bool failOnError, uint64 *relationSize)
@ -578,7 +581,8 @@ DistributedRelationSize(Oid relationId, SizeQueryType sizeQueryType,
* DistributedRelationSizeOnWorker gets the workerNode and relationId to calculate * DistributedRelationSizeOnWorker gets the workerNode and relationId to calculate
* size of that relation on the given workerNode by summing up the size of each * size of that relation on the given workerNode by summing up the size of each
* shard placement. * shard placement.
*/ * Input relation is allowed to be an index on a distributed table too.
*/
static bool static bool
DistributedRelationSizeOnWorker(WorkerNode *workerNode, Oid relationId, DistributedRelationSizeOnWorker(WorkerNode *workerNode, Oid relationId,
SizeQueryType sizeQueryType, SizeQueryType sizeQueryType,
@ -787,9 +791,7 @@ GenerateSizeQueryOnMultiplePlacements(List *shardIntervalList,
continue; continue;
} }
/* /* we need to build the shard relation name, being an index or table */
* We need to build the shard relation name, being an index or table ...
*/
Oid objectId = OidIsValid(indexId) ? indexId : shardInterval->relationId; Oid objectId = OidIsValid(indexId) ? indexId : shardInterval->relationId;
uint64 shardId = shardInterval->shardId; uint64 shardId = shardInterval->shardId;