mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Ignore post-write repository synchronization if no devices are configured
Summary: Fixes T10789. If we aren't configured with a device, we never grabbed a lock in the first place, and should not expect one to be held. Test Plan: Pushed non-cluster-configured Git SSH repository. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10789 Differential Revision: https://secure.phabricator.com/D15692
This commit is contained in:
parent
110223c1a7
commit
33060d1652
1 changed files with 5 additions and 8 deletions
|
@ -2375,6 +2375,11 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
|||
* @task sync
|
||||
*/
|
||||
public function synchronizeWorkingCopyAfterWrite() {
|
||||
$device = AlmanacKeys::getLiveDevice();
|
||||
if (!$device) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$this->clusterWriteLock) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
|
@ -2382,14 +2387,6 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
|||
'lock!'));
|
||||
}
|
||||
|
||||
$device = AlmanacKeys::getLiveDevice();
|
||||
if (!$device) {
|
||||
throw new Exception(
|
||||
pht(
|
||||
'Trying to synchronize after write, but this host is not an '.
|
||||
'Almanac device.'));
|
||||
}
|
||||
|
||||
$repository_phid = $this->getPHID();
|
||||
$device_phid = $device->getPHID();
|
||||
|
||||
|
|
Loading…
Reference in a new issue