mirror of https://github.com/citusdata/citus.git
Refactor one helper function
The code looks simpler and easier to read now.pull/7562/head
parent
8afa2d0386
commit
13e739703e
|
@ -492,19 +492,7 @@ stop_metadata_sync_to_node(PG_FUNCTION_ARGS)
|
|||
bool
|
||||
ClusterHasKnownMetadataWorkers()
|
||||
{
|
||||
bool workerWithMetadata = false;
|
||||
|
||||
if (!IsCoordinator())
|
||||
{
|
||||
workerWithMetadata = true;
|
||||
}
|
||||
|
||||
if (workerWithMetadata || HasMetadataWorkers())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return !IsCoordinator() || HasMetadataWorkers();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue