From 9f399247b1b107e88f0abdf215b7b9bdf4cf0223 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 23 May 2016 17:13:12 -0700 Subject: [PATCH] (stable) Fix a possible fatal on the first push to a cluster repository Summary: Fixes T11020. I think this resolves things -- `$new_version` (set above) should be used, not `$new_log` directly. Specifically, we would get into trouble if the initial push failed for some reason (working copy not initialized yet, commit hook rejected, etc). Test Plan: Made a bad push to a new repository. Saw it freeze before the patch and succeed afterwards. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11020 Differential Revision: https://secure.phabricator.com/D15969 --- .../diffusion/protocol/DiffusionRepositoryClusterEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php index e3c70fecd9..b271c16741 100644 --- a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php +++ b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php @@ -391,7 +391,7 @@ final class DiffusionRepositoryClusterEngine extends Phobject { $repository_phid, $device_phid, $this->clusterWriteVersion, - $new_log->getID(), + $new_version, $this->clusterWriteOwner); $did_release = true; break;