mirror of https://github.com/citusdata/citus.git
sync_metadata_only_needed
parent
ee472e789e
commit
8bc835eed3
|
@ -922,9 +922,16 @@ ActivateNode(char *nodeName, int nodePort)
|
||||||
static bool
|
static bool
|
||||||
ShouldSyncMetadataToNewNode(WorkerNode *newNode)
|
ShouldSyncMetadataToNewNode(WorkerNode *newNode)
|
||||||
{
|
{
|
||||||
uint32 primaryWorkerCount = ActivePrimaryNonCoordinatorNodeCount();
|
uint32 primaryWorkerCount =
|
||||||
|
ActivePrimaryNonCoordinatorNodeCount();
|
||||||
uint32 primariesWithMetadata = CountPrimaryWorkersWithMetadata();
|
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)
|
if (primaryWorkerCount != 0 && primariesWithMetadata == 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue