Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15423165
D17774.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
D17774.diff
View Options
diff --git a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
--- a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
+++ b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
@@ -559,8 +559,7 @@
return false;
}
- // TODO: For now, this is only supported for Git.
- if (!$repository->isGit()) {
+ if (!$repository->supportsSynchronization()) {
return false;
}
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
@@ -1929,10 +1929,31 @@
'Cluster hosts must correctly route their intracluster requests.'));
}
+ if (count($results) > 1) {
+ if (!$this->supportsSynchronization()) {
+ throw new Exception(
+ pht(
+ 'Repository "%s" is bound to multiple active repository hosts, '.
+ 'but this repository does not support cluster synchronization. '.
+ 'Declusterize this repository or move it to a service with only '.
+ 'one host.',
+ $this->getDisplayName()));
+ }
+ }
+
shuffle($results);
return head($results);
}
+ public function supportsSynchronization() {
+ // TODO: For now, this is only supported for Git.
+ if (!$this->isGit()) {
+ return false;
+ }
+
+ return true;
+ }
+
public function getAlmanacServiceCacheKey() {
$service_phid = $this->getAlmanacServicePHID();
if (!$service_phid) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 23, 1:34 PM (1 w, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7718528
Default Alt Text
D17774.diff (1 KB)
Attached To
Mode
D17774: Detect unsynchronizable repositories on multiple cluster hosts
Attached
Detach File
Event Timeline
Log In to Comment