Refactor one helper function

The code looks simpler and easier to read now.
pull/7562/head
Hanefi Onaldi 2024-03-18 14:34:24 +03:00
parent 8afa2d0386
commit 13e739703e
No known key found for this signature in database
GPG Key ID: F18CDB10BA0DFDC7
1 changed files with 1 additions and 13 deletions

View File

@ -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();
}