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)); }