Differential D16115 Diff 40574 src/infrastructure/cluster/PhabricatorClusterDatabasesConfigOptionType.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/cluster/PhabricatorClusterDatabasesConfigOptionType.php
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | foreach ($value as $index => $spec) { | ||||
'Database cluster configuration is invalid: it describes the '. | 'Database cluster configuration is invalid: it describes the '. | ||||
'same host ("%s") multiple times. Each host should appear only '. | 'same host ("%s") multiple times. Each host should appear only '. | ||||
'once in the list.', | 'once in the list.', | ||||
$host)); | $host)); | ||||
} | } | ||||
$map[$key] = true; | $map[$key] = true; | ||||
} | } | ||||
if (count($masters) > 1) { | |||||
throw new Exception( | |||||
pht( | |||||
'Database cluster configuration is invalid: it describes multiple '. | |||||
'masters. No more than one host may be a master. Hosts currently '. | |||||
'configured as masters: %s.', | |||||
implode(', ', $masters))); | |||||
} | |||||
} | } | ||||
} | } |