commit | 209eba756f281418d917173fcc6b6c75cd12462a | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Wed Jul 15 23:27:29 2020 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Wed Jul 15 23:27:29 2020 +0100 |
tree | 36826c8d5fdb11ead49e60a906999804106d74b2 | |
parent | ced7fc318feb76e2fc6d549669c5f5d8d905add5 [diff] | |
parent | f3018192441107e430294c7ddfc44d72e74061e8 [diff] |
Merge branch 'stable-3.2' * stable-3.2: Fix naming for delay for draining the replication event queue Change-Id: I00f99a78916e19a24e943981f1f857fafd8fd00e
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java index 8f04c74..e2f9515 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
@@ -757,8 +757,8 @@ return config.getDrainQueueAttempts(); } - public int getReplicationDelaySeconds() { - return config.getDelay() * 1000; + public long getReplicationDelayMilliseconds() { + return config.getDelay() * 1000L; } int getSlowLatencyThreshold() {
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/DestinationsCollection.java b/src/main/java/com/googlesource/gerrit/plugins/replication/DestinationsCollection.java index ac14657..747c0f6 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/DestinationsCollection.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/DestinationsCollection.java
@@ -225,7 +225,7 @@ logger.atInfo().log( "Draining replication events, postpone shutdown. Events left: inFlight %d, pending %d", inFlight, pending); - Thread.sleep(destination.getReplicationDelaySeconds()); + Thread.sleep(destination.getReplicationDelayMilliseconds()); } catch (InterruptedException ie) { logger.atWarning().withCause(ie).log( "Wait for replication events to drain has been interrupted");