mirror of https://github.com/citusdata/citus.git
Add the locking mechanism before the check for whether the coordinator already exists
parent
68d28ecdc0
commit
3e5afb2d6e
|
@ -0,0 +1 @@
|
|||
Subproject commit 3376bd6845f0614908ed304f5033bd644c82d3bf
|
|
@ -217,6 +217,9 @@ citus_set_coordinator_host(PG_FUNCTION_ARGS)
|
|||
EnsureTransactionalMetadataSyncMode();
|
||||
}
|
||||
|
||||
/* prevent concurrent modification */
|
||||
LockRelationOid(DistNodeRelationId(), RowExclusiveLock);
|
||||
|
||||
bool isCoordinatorInMetadata = false;
|
||||
WorkerNode *coordinatorNode = PrimaryNodeForGroup(COORDINATOR_GROUP_ID,
|
||||
&isCoordinatorInMetadata);
|
||||
|
|
Loading…
Reference in New Issue