diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2016-01-25 01:18:21 +0000 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2016-01-25 01:18:21 +0000 |
commit | 154fc97697f6a3caacc0b25d68bad96a5b0afcdf (patch) | |
tree | 87a76e160072dbdb5ef4ffde7168f6ba5cfc6427 | |
parent | 173494bb65cd8bf6c73a4bdcb0947090522896ed (diff) |
Revert "Replicate HEAD reference when replicating a project"
Causes unacceptable performance degrade.
This reverts commit 173494bb65cd8bf6c73a4bdcb0947090522896ed.
Change-Id: I48655e074e85c166ecd8b6aad5fa5fbce7f0732f
-rw-r--r-- | src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java | 6 | ||||
-rw-r--r-- | src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java | 10 |
2 files changed, 3 insertions, 13 deletions
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java index 36e3ecb..255c51b 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java @@ -372,7 +372,6 @@ class PushOne implements ProjectRunnable { PushResult res; try { res = pushVia(tn); - updateHead(); } finally { try { tn.close(); @@ -546,11 +545,6 @@ class PushOne implements ProjectRunnable { cmds.add(new RemoteRefUpdate(git, (Ref) null, dst, force, null, null)); } - private void updateHead() throws IOException { - replicationQueue.updateHead(projectName, git.getRef(Constants.HEAD) - .getTarget().getName()); - } - private void updateStates(Collection<RemoteRefUpdate> refUpdates) throws LockFailureException { Set<String> doneRefs = new HashSet<>(); diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java index c3b4675..95693d9 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java @@ -163,13 +163,9 @@ class ReplicationQueue implements @Override public void onHeadUpdated(HeadUpdatedListener.Event event) { - updateHead(new Project.NameKey(event.getProjectName()), - event.getNewHeadName()); - } - - void updateHead(Project.NameKey project, String newHeadName) { - for (URIish uri : getURIs(project, FilterType.ALL)) { - updateHead(uri, newHeadName); + for (URIish uri : getURIs(new Project.NameKey(event.getProjectName()), + FilterType.ALL)) { + updateHead(uri, event.getNewHeadName()); } } |