sync_metadata_only_needed
Onder Kalaci 2021-12-21 09:40:44 +01:00
parent ee472e789e
commit 8bc835eed3
1 changed files with 8 additions and 1 deletions

View File

@ -922,9 +922,16 @@ ActivateNode(char *nodeName, int nodePort)
static bool
ShouldSyncMetadataToNewNode(WorkerNode *newNode)
{
uint32 primaryWorkerCount = ActivePrimaryNonCoordinatorNodeCount();
uint32 primaryWorkerCount =
ActivePrimaryNonCoordinatorNodeCount();
uint32 primariesWithMetadata = CountPrimaryWorkersWithMetadata();
/*
* TODO: make this check safer
* exclude the newNode as it is already in the metadata
*/
primaryWorkerCount -= 1;
if (primaryWorkerCount != 0 && primariesWithMetadata == 0)
{
/*