commit | 1b171d48e4257e6e0c5189c30b8e2198c5ee1d8e | [log] [tgz] |
---|---|---|
author | Nasser Grainawi <nasser@codeaurora.org> | Wed Sep 02 08:48:27 2020 -0600 |
committer | Nasser Grainawi <nasser@codeaurora.org> | Wed Sep 02 08:48:27 2020 -0600 |
tree | 507ad5a4764ce36a3e32aed38fc89bf4a190b184 | |
parent | 77d4b6c2b73b8f997a77800811ae314c8b96d406 [diff] |
ReplicationTasksStorage: Remove synchronized from list* methods These synchronized statements were added to make the tests pass. However, they have undesirable behavior when considering production systems (such as the concern raised in [1]). [1] https://gerrit-review.googlesource.com/c/plugins/replication/+/280357/comment/757c5227_0de2800d/ Change-Id: I5556ea318aed400eb43c60fdbda41106dd4a17ff
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java index 048767f..ee470cc 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java
@@ -132,11 +132,11 @@ } } - public synchronized List<ReplicateRefUpdate> listWaiting() { + public List<ReplicateRefUpdate> listWaiting() { return list(createDir(waitingUpdates)); } - public synchronized List<ReplicateRefUpdate> listRunning() { + public List<ReplicateRefUpdate> listRunning() { return list(createDir(runningUpdates)); }