commit | 7c31087623674bea9b3848a0323853344c5aa260 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Wed Jul 15 21:49:03 2020 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Wed Jul 15 21:49:03 2020 +0100 |
tree | b5a7195f853aad1703f07ad77017c26893efbcc0 | |
parent | 1812e0d2ce7e261d90e7c0b726376a6938680786 [diff] | |
parent | 9f679b030aedcb5cdae6810798f2602b62f58fa0 [diff] |
Merge branch 'stable-2.16' into stable-3.0 * stable-2.16: Fix naming for delay for draining the replication event queue Change-Id: I3cba1756a10a1c12db96d04ca55d3feb7bc8784e
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 d68739a..3b8208b 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
@@ -771,8 +771,8 @@ return config.getDrainQueueAttempts(); } - public int getReplicationDelaySeconds() { - return config.getDelay() * 1000; + public long getReplicationDelayMilliseconds() { + return config.getDelay() * 1000L; } private static boolean matches(URIish uri, String urlMatch) {
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationFileBasedConfig.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationFileBasedConfig.java index 4e6299a..3094929 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationFileBasedConfig.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationFileBasedConfig.java
@@ -347,7 +347,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");