|author||Luca Milanesio <firstname.lastname@example.org>||Thu Sep 16 21:04:17 2021 +0100|
|committer||Luca Milanesio <email@example.com>||Fri Oct 01 00:13:10 2021 +0100|
Front CacheChronicleMap with a Guava cache The initial implementation of persistent caches using ChronicleMap did not use any Guava cache front-end, relying on the speed of accessing data on disk and memory. Unfortunately, the deserialisation of some entities (e.g. change_notes) is very expensive in terms of CPU and ChronicleMap does not store the binary objects as-is but relies on in-memory serialisation of keys and values. There are two problems caused by this: - delay in reading the cache from memory - high system load when accessing the cache Use the same structure of the H2 persistent cache where the loader is delegated to the retrieval and deserialisation of the entities from ChronicleMap. Amend the cache statistics and return the in-memory elements and the ones stored on disk as separate values. Bug: Issue 15036 Change-Id: I8dd602c20fcd621972b562fc2163fefc7240484a
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
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.