mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 13:22:42 +01:00
Disable repository read/write synchronization for now
Summary: This nearly works but I didn't have time to get back to it and it isn't stable enough to turn on in the cluster yet. We have enough other stuff going out this week, so just disable it before `stable` gets cut. Should be ready by next week if things go well. Test Plan: Fetched a Git SSH repo locally. Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D15731
This commit is contained in:
parent
b2db1ec2ca
commit
d96b6506d7
1 changed files with 22 additions and 6 deletions
|
@ -2269,16 +2269,30 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
|||
/* -( Cluster Synchronization )-------------------------------------------- */
|
||||
|
||||
|
||||
private function shouldEnableSynchronization() {
|
||||
// TODO: This mostly works, but isn't stable enough for production yet.
|
||||
return false;
|
||||
|
||||
$device = AlmanacKeys::getLiveDevice();
|
||||
if (!$device) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task sync
|
||||
*/
|
||||
public function synchronizeWorkingCopyBeforeRead() {
|
||||
$device = AlmanacKeys::getLiveDevice();
|
||||
if (!$device) {
|
||||
if (!$this->shouldEnableSynchronization()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$repository_phid = $this->getPHID();
|
||||
|
||||
$device = AlmanacKeys::getLiveDevice();
|
||||
$device_phid = $device->getPHID();
|
||||
|
||||
$read_lock = PhabricatorRepositoryWorkingCopyVersion::getReadLock(
|
||||
|
@ -2332,12 +2346,13 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
|||
* @task sync
|
||||
*/
|
||||
public function synchronizeWorkingCopyBeforeWrite() {
|
||||
$device = AlmanacKeys::getLiveDevice();
|
||||
if (!$device) {
|
||||
if (!$this->shouldEnableSynchronization()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$repository_phid = $this->getPHID();
|
||||
|
||||
$device = AlmanacKeys::getLiveDevice();
|
||||
$device_phid = $device->getPHID();
|
||||
|
||||
$write_lock = PhabricatorRepositoryWorkingCopyVersion::getWriteLock(
|
||||
|
@ -2375,8 +2390,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
|||
* @task sync
|
||||
*/
|
||||
public function synchronizeWorkingCopyAfterWrite() {
|
||||
$device = AlmanacKeys::getLiveDevice();
|
||||
if (!$device) {
|
||||
if (!$this->shouldEnableSynchronization()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2388,6 +2402,8 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO
|
|||
}
|
||||
|
||||
$repository_phid = $this->getPHID();
|
||||
|
||||
$device = AlmanacKeys::getLiveDevice();
|
||||
$device_phid = $device->getPHID();
|
||||
|
||||
// NOTE: This means we're still bumping the version when pushes fail. We
|
||||
|
|
Loading…
Reference in a new issue