Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F17804198
D15731.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D15731.id.diff
View Options
diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php
--- a/src/applications/repository/storage/PhabricatorRepository.php
+++ b/src/applications/repository/storage/PhabricatorRepository.php
@@ -2269,16 +2269,30 @@
/* -( 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 @@
* @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 @@
* @task sync
*/
public function synchronizeWorkingCopyAfterWrite() {
- $device = AlmanacKeys::getLiveDevice();
- if (!$device) {
+ if (!$this->shouldEnableSynchronization()) {
return;
}
@@ -2388,6 +2402,8 @@
}
$repository_phid = $this->getPHID();
+
+ $device = AlmanacKeys::getLiveDevice();
$device_phid = $device->getPHID();
// NOTE: This means we're still bumping the version when pushes fail. We
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 26, 11:07 AM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8614017
Default Alt Text
D15731.id.diff (1 KB)
Attached To
Mode
D15731: Disable repository read/write synchronization for now
Attached
Detach File
Event Timeline
Log In to Comment