From 694b34084ca623756a9ec7e6a60631ab6027d5c2 Mon Sep 17 00:00:00 2001 From: Nasser Grainawi Date: Sat, 19 Aug 2023 19:25:21 -0600 Subject: TasksStorage: Remove synchronized from methods These aren't expected to be necessary for correctness. Change-Id: Id23d3b385e289ba453638b76d6523016a5aabf2a --- .../gerrit/plugins/replication/ReplicationTasksStorage.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 0d5604c..c847f55 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java @@ -137,11 +137,11 @@ public class ReplicationTasksStorage { return isMultiPrimary; } - public synchronized String create(ReplicateRefUpdate r) { + public String create(ReplicateRefUpdate r) { return new Task(r).create(); } - public synchronized Set start(UriUpdates uriUpdates) { + public Set start(UriUpdates uriUpdates) { Set startedRefs = new HashSet<>(); for (ReplicateRefUpdate update : uriUpdates.getReplicateRefUpdates()) { Task t = new Task(update); @@ -152,13 +152,13 @@ public class ReplicationTasksStorage { return startedRefs; } - public synchronized void reset(UriUpdates uriUpdates) { + public void reset(UriUpdates uriUpdates) { for (ReplicateRefUpdate update : uriUpdates.getReplicateRefUpdates()) { new Task(update).reset(); } } - public synchronized void recoverAll() { + public void recoverAll() { streamRunning().forEach(r -> new Task(r).recover()); } -- cgit v1.2.3