diff --git a/src/applications/config/controller/PhabricatorConfigClusterRepositoriesController.php b/src/applications/config/controller/PhabricatorConfigClusterRepositoriesController.php index a61f0e3535..b3fd9915b1 100644 --- a/src/applications/config/controller/PhabricatorConfigClusterRepositoriesController.php +++ b/src/applications/config/controller/PhabricatorConfigClusterRepositoriesController.php @@ -153,6 +153,14 @@ final class PhabricatorConfigClusterRepositoriesController $versions = idx($repository_versions, $repository_phid, array()); + // Filter out any versions for devices which are no longer active. + foreach ($versions as $key => $version) { + $version_device_phid = $version->getDevicePHID(); + if (empty($active_devices[$version_device_phid])) { + unset($versions[$key]); + } + } + $leaders = 0; foreach ($versions as $version) { if ($version->getRepositoryVersion() == $leader_version) { diff --git a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php index 6fa0bac9e8..3be69d356d 100644 --- a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php +++ b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php @@ -104,7 +104,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject { // We identify all the cluster leaders and reset their version to 0. // We identify all the cluster followers and demote them. - // This allows the cluter to start over again at version 0 but keep the + // This allows the cluster to start over again at version 0 but keep the // same leaders. if ($versions) {