Remove all GetWorkerNodeCount() references

As @onderkalaci suggested removing the definition of GetWorkerNodeCount() that can potentially cause misunderstandings.

I can advise using ActiveReadableWorkerNodeCount() that returns the number of active primaries is a safer alternative than GetWorkerNodeCount() that returns the total number of workers containing inactives, primaries, and unavailable nodes. I introduced a bug #3556 and in the bugfix #3564 removed the single usage of said function
pull/3593/head^2
Hanefi Onaldi 2020-03-09 13:35:18 +03:00 committed by GitHub
parent 426b8ff1a9
commit 2595b4864b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 15 deletions

View File

@ -2978,20 +2978,6 @@ GetWorkerNodeHash(void)
}
/*
* GetWorkerNodeCount returns the number of worker nodes
*
* If the Worker Node cache is not (yet) valid, it is first rebuilt.
*/
int
GetWorkerNodeCount(void)
{
PrepareWorkerNodeCache();
return WorkerNodeCount;
}
/*
* PrepareWorkerNodeCache makes sure the worker node data from pg_dist_node is cached,
* if it is not already cached.

View File

@ -158,7 +158,6 @@ extern char LookupDistributionMethod(Oid distributionMethodOid);
/* access WorkerNodeHash */
extern HTAB * GetWorkerNodeHash(void);
extern int GetWorkerNodeCount(void);
extern WorkerNode * LookupNodeByNodeId(uint32 nodeId);
extern WorkerNode * ForceLookupNodeByNodeId(uint32 nodeId);
extern WorkerNode * LookupNodeForGroup(int32 groupId);