Refactor one helper function (#7562)

The code looks simpler and easier to read now.
pull/7544/head^2
Hanefi Onaldi 2024-03-18 15:06:49 +03:00 committed by GitHub
parent 8afa2d0386
commit bf05bf51ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 13 deletions

View File

@ -492,19 +492,7 @@ stop_metadata_sync_to_node(PG_FUNCTION_ARGS)
bool bool
ClusterHasKnownMetadataWorkers() ClusterHasKnownMetadataWorkers()
{ {
bool workerWithMetadata = false; return !IsCoordinator() || HasMetadataWorkers();
if (!IsCoordinator())
{
workerWithMetadata = true;
}
if (workerWithMetadata || HasMetadataWorkers())
{
return true;
}
return false;
} }