Merge branch 'stable-2.16' into stable-3.0 * stable-2.16: Fix synopsis in replication start cmd documentation Don't wait for pending events to process on startup Change-Id: If4bc69761a19a0137301535759dc8a317ea04186
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java index cf344f8..4079df9 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java
@@ -78,7 +78,9 @@ if (!running) { config.startup(workQueue); running = true; - firePendingEvents(); + Thread t = new Thread(this::firePendingEvents, "firePendingEvents"); + t.setDaemon(true); + t.start(); fireBeforeStartupEvents(); } } @@ -196,6 +198,8 @@ repLog.error("Encountered malformed URI for persisted event %s", t); } } + } catch (Throwable e) { + repLog.error("Unexpected error while firing pending events", e); } finally { replaying = false; }
diff --git a/src/main/resources/Documentation/cmd-start.md b/src/main/resources/Documentation/cmd-start.md index 8291421..e12ec92 100644 --- a/src/main/resources/Documentation/cmd-start.md +++ b/src/main/resources/Documentation/cmd-start.md
@@ -11,8 +11,7 @@ ssh -p @SSH_PORT@ @SSH_HOST@ @PLUGIN@ start [--now] [--wait] - [--url <PATTERN>] - {--all | <PROJECT PATTERN> ...} + {--url <PATTERN> | [--url <PATTERN>] --all | [--url <PATTERN>] <PROJECT PATTERN> ...} ``` DESCRIPTION