mirror of https://github.com/citusdata/citus.git
Add the option to skip the node that is executing the node
parent
a4c6cefb17
commit
97ba7bf2eb
|
@ -117,7 +117,15 @@ SendBareCommandListToWorkers(TargetWorkerSet targetWorkerSet, List *commandList)
|
|||
int nodePort = workerNode->workerPort;
|
||||
int connectionFlags = FORCE_NEW_CONNECTION;
|
||||
|
||||
if (targetWorkerSet == WORKERS_WITH_METADATA && !workerNode->hasMetadata)
|
||||
if ((targetWorkerSet == WORKERS_WITH_METADATA ||
|
||||
targetWorkerSet == WORKERS_WITH_METADATA_EXCLUDE_CURRENT_WORKER) &&
|
||||
!workerNode->hasMetadata)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (targetWorkerSet == WORKERS_WITH_METADATA_EXCLUDE_CURRENT_WORKER &&
|
||||
workerNode->groupId == GetLocalGroupId())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -169,7 +177,15 @@ SendCommandToWorkersParams(TargetWorkerSet targetWorkerSet, char *command,
|
|||
MultiConnection *connection = NULL;
|
||||
int connectionFlags = 0;
|
||||
|
||||
if (targetWorkerSet == WORKERS_WITH_METADATA && !workerNode->hasMetadata)
|
||||
if ((targetWorkerSet == WORKERS_WITH_METADATA ||
|
||||
targetWorkerSet == WORKERS_WITH_METADATA_EXCLUDE_CURRENT_WORKER) &&
|
||||
!workerNode->hasMetadata)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (targetWorkerSet == WORKERS_WITH_METADATA_EXCLUDE_CURRENT_WORKER &&
|
||||
workerNode->groupId == GetLocalGroupId())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
typedef enum TargetWorkerSet
|
||||
{
|
||||
WORKERS_WITH_METADATA,
|
||||
WORKERS_WITH_METADATA_EXCLUDE_CURRENT_WORKER,
|
||||
ALL_WORKERS
|
||||
} TargetWorkerSet;
|
||||
|
||||
|
|
Loading…
Reference in New Issue