Our Gerrit instance is accumulating open changes over time. Whenever a change is merged, Gerrit recompute the mergeability of each of the open changes and reindex them, that shows up as spikes in the index_batch queue ( https://grafana.wikimedia.org/d/tllYBrhGz/queues?orgId=1&viewPanel=32&from=now-3d&to=now ):
This adds load on the server.
The online documentation has a section about change cleanup:
Abandoning old inactive changes has the following advantages:
it signals change authors that changes are considered outdated
it keeps dashboards clean
it reduces the load on the server (for open changes the mergeability flag is recomputed whenever a change is merged)
The configuration is done via is gerrit-config changeCleanup.
When a change is abandoned, the following default message is posted:
Auto-Abandoned due to inactivity, see https://gerrit.wikimedia.org/r/Documentation/user-change-cleanup.html#auto-abandon
If this change is still wanted it should be restored.
Using some code I wrote a decade ago ( https://github.com/hashar/gerritboard ), our instance has ~ 7500 open changes. The repositories with the most open changes are:
| mediawiki/core | 1641 |
| operations/puppet | 802 |
| pywikibot/core | 184 |
| operations/mediawiki-config | 163 |
| mediawiki/services/parsoid | 156 |
| mediawiki/extensions/Wikibase | 140 |
| operations/deployment-charts | 126 |
| mediawiki/extensions/VisualEditor | 101 |
| mediawiki/extensions/Cite | 85 |
| VisualEditor/VisualEditor | 80 |
