Following up on:
We'll need to update the replication plugin for Gerrit, and add the new metrics on our dashboards and alerts.
Upstream issue https://issues.gerritcodereview.com/issues/461836624
Following up on:
We'll need to update the replication plugin for Gerrit, and add the new metrics on our dashboards and alerts.
Upstream issue https://issues.gerritcodereview.com/issues/461836624
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Jgiannelos | T416899 CTT tasks week of 2026-02-06 | |||
| Resolved | hashar | T416912 Replication to GitHub seems to have stalled | |||
| Open | hashar | T418084 gerrit: replication monitoring improvement | |||
| Open | hashar | T418215 Update gerrit replication plugin with new metrics | |||
| Open | None | T418216 Create alerts using the new replication metrics exposed in Gerrit |
The plugin creates a WorkQueue using Gerrit core interface and when metrics are enabled that creates a metric system from Gerrit core. When reloading the plugin, it stops the queue and create a new one but the associated Metrics does not support being stopped/destroyed, that never happens in Gerrit core.
The PluginMetrics support being stopped. So we need the core WorkQueue to learn a new method to which we could pass it a PluginMetrics and check/verify it is stopped when the WorkQueue is stopped.
Matthias Sohn from upstream provided some reviews already :-] So that is hmm, in progress!
While reviewing the release notes for Gerrit 3.11, there is a bug fix in 3.11.8 that seems related. From https://www.gerritcodereview.com/3.11.html#3118:
Bug Fixes
Issue 461836624: Deregister queue metrics upon unload, allowing plugins to enable metrics on executors.
Previously, the WorkQueue did not deregister metrics upon shutdown. This prevented plugins from effectively creating queues with associated metrics, often resulting in reloading or restarting failures due to duplicated metric names.
The issue report has:
- Create a plugin with a custom queue "myqueue" and associated queue metrics:
workQueue.createQueue(10, "myqueue", true)
- Install the plugin under $GERRIT_SITE/plugins
- Stop the plugin
- Start the plugin
The queue metrics associated with the queue_myqueue_* are created at 2, but NOT removed at 3 and the start of the plugin at 4 fails because of metrics names conflicts.
Fixed by https://gerrit-review.googlesource.com/c/gerrit/+/528441 which is in 3.11.8, 3.12.4, 3.13.2.
That is seems closely related. I'll test it later with 3.11.8