commit | 310060ed9230d24261752728a9b3bd04f2bf8d62 | [log] [tgz] |
---|---|---|
author | Jacek Centkowski <geminica.programs@gmail.com> | Wed Aug 31 17:13:36 2022 +0200 |
committer | Jacek Centkowski <geminica.programs@gmail.com> | Wed Sep 14 07:43:41 2022 +0200 |
tree | e16ff020564eae788f69dfc1cf4c630e8445bc34 | |
parent | b66414979781efc00889800ae83b2c478de7abf2 [diff] |
Remove metrics when cache gets closed When plugin with persistent caches gets reloaded it fails to load with the following exception: java.lang.IllegalArgumentException: A metric named cache/chroniclemap/percentage_free_space_test-cache-plugin_test_cache already exists ... The problem is caused by cache related metrics that are created when cache-chroniclemap instantiates the persistent cache implementation for plugin that is being reloaded. This change ensures that all cache related metrics are removed when cache is closed. Notes: * This is the necessary but not sufficient step to solve #15587. It is enough to solve the happy path when 'Gerrit-ReloadMode: restart'. IOW when the old version of plugin with persistent caches gets unloaded before the new version is loaded. * Description on how to reload plugin with persistent caches when cache-chroniclemap lib-module is installed was added to migration.md Bug: Issue 15587 Depends-On: I06d48535702a8acd0bcb4e1315a35b3c1d1768cb Change-Id: I03e34dd3463fad00ba8fbc174597c896a93db547
Non-blocking and super-fast on-disk cache libModule for Gerrit Code Review based on ChronicleMap on-disk implementation.
This libModule is built like a Gerrit in-tree plugin, using Bazelisk. See the build instructions for more details.
Install the chronicle-map module into the $GERRIT_SITE/lib
directory.
Add the cache-chroniclemap module to $GERRIT_SITE/etc/gerrit.config
as follows:
[gerrit] installModule = com.googlesource.gerrit.modules.cache.chroniclemap.ChronicleMapCacheModule
For further information and supported options, refer to config documentation.
You can check how to migrate from H2 to chronicle-map here.