commit | 2d0a81de8ed66423a2a79fa168e8ec7f31112bbc | [log] [tgz] |
---|---|---|
author | Jacek Centkowski <geminica.programs@gmail.com> | Thu Jul 21 07:13:20 2022 +0200 |
committer | Jacek Centkowski <geminica.programs@gmail.com> | Wed Jul 27 11:12:27 2022 +0200 |
tree | 183ab27701277f71e90e4e49571c3686ac6f35eb | |
parent | 7831ac2c0e29090b88827930c86d05365c5de513 [diff] |
Persist caches keys index at configurable pace Introduce 'cache.persistIndexEvery' parameter (by default '15m') that specifies how often indexes should be persisted to a disk. Notes: * in order to avoid race condition between evict and persist operations the latter is performed after the former is finished * considering the above the smallest duration between persist operations is 30s amd smaller values of 'persistIndexEvery' will be rounded up to 30s * higher values are rounded down (if needed) to the closest multiple of 30s * persist operation is additionally called on Gerrit exit - regardless of the configured duration but it will be skipped on a particular index level if there is one already running (as a result of schedule) * persist operation is scheduled in a dedicated thread 'ChronicleMap-Index-0' Example when 'cache.persistIndexEvery = 2m' it means that persist operation will be performed after every 4th eviction is finished. And additionally on Gerrit exit provided that there is no one in progress. Bug: Issue 15121 Change-Id: Ib6ea9c0e2819bf6d93ab4654db9e8a2abc8b5b20
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.