@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Ignore repository versions on inactive devices in "Repository Servers" panel in Config

Summary:
Fixes T11590. Currently, we incorrectly consider cluster repository versions that are (or were) on devices which are no longer part of the active cluster service when building this status screen.

Instead, ignore them. This is just a display bug; the actual `ClusterEngine` already had similar logic.

Test Plan:
- Added a bad leader record to `repository_workingcopyversion`.
- Before patch, got a bad "Partial (1w)" sync:

{F1802292}

- After patch, got a good "Sycnchronized":

{F1802293}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11590

Differential Revision: https://secure.phabricator.com/D16492

+9 -1
+8
src/applications/config/controller/PhabricatorConfigClusterRepositoriesController.php
··· 153 153 154 154 $versions = idx($repository_versions, $repository_phid, array()); 155 155 156 + // Filter out any versions for devices which are no longer active. 157 + foreach ($versions as $key => $version) { 158 + $version_device_phid = $version->getDevicePHID(); 159 + if (empty($active_devices[$version_device_phid])) { 160 + unset($versions[$key]); 161 + } 162 + } 163 + 156 164 $leaders = 0; 157 165 foreach ($versions as $version) { 158 166 if ($version->getRepositoryVersion() == $leader_version) {
+1 -1
src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
··· 104 104 // We identify all the cluster leaders and reset their version to 0. 105 105 // We identify all the cluster followers and demote them. 106 106 107 - // This allows the cluter to start over again at version 0 but keep the 107 + // This allows the cluster to start over again at version 0 but keep the 108 108 // same leaders. 109 109 110 110 if ($versions) {