Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14355273
D16916.id40727.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
D16916.id40727.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
@@ -175,7 +175,8 @@
pht(
'Failed to acquire read lock after waiting %s second(s). You '.
'may be able to retry later.',
- new PhutilNumber($lock_wait)));
+ new PhutilNumber($lock_wait)),
+ $ex);
}
$versions = PhabricatorRepositoryWorkingCopyVersion::loadVersions(
diff --git a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
--- a/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
+++ b/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php
@@ -826,7 +826,6 @@
$locks = array();
foreach ($apis as $api) {
- $ref_key = $api->getRef()->getRefKey();
$locks[] = $this->lock($api);
}
@@ -981,6 +980,21 @@
// up to date one at a time we can end up in a big mess.
$duration_map = array();
+
+ // First, find any global patches which have been applied to ANY database.
+ // We are just going to mark these as applied without actually running
+ // them. Otherwise, adding new empty masters to an existing cluster will
+ // try to apply them against invalid states.
+ foreach ($patches as $key => $patch) {
+ if ($patch->getIsGlobalPatch()) {
+ foreach ($applied_map as $ref_key => $applied) {
+ if (isset($applied[$key])) {
+ $duration_map[$key] = 1;
+ }
+ }
+ }
+ }
+
while (true) {
$applied_something = false;
foreach ($patches as $key => $patch) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 5:43 PM (8 h, 5 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6907639
Default Alt Text
D16916.id40727.diff (1 KB)
Attached To
Mode
D16916: Fix a couple of partition migration bugs
Attached
Detach File
Event Timeline
Log In to Comment