commit | 8688e1ceb4746c0a52a173cd3679707a4c3053af | [log] [tgz] |
---|---|---|
author | Jacek Centkowski <geminica.programs@gmail.com> | Mon Oct 23 12:55:55 2023 +0200 |
committer | Jacek Centkowski <geminica.programs@gmail.com> | Fri Oct 27 08:37:38 2023 +0200 |
tree | 21cad605b6d534bd8dd947982eb300040276fc5e | |
parent | 527a48e2bab850bc7f9d810794dfa5f5a0871a8d [diff] |
Ensure JDK 17 support. The cache-chroniclemap internals are JDK 17 compatible however JDK, since that version is more restrictive on which modules are by default accessible to the third party libraries. Enhance plugin's README.md and build.md with steps that are necessary to run module in Gerrit under JDK 17 JVM and call test from IDE (as described in [1]). In addition JDK 17 modifies the way how annotations have their `toString` method implemented. In JDK 11 (and older) it used to be: @com.google.inject.name.Named(value="accounts") Whereas in JDK 17 it is: @com.google.inject.name.Named("accounts") Modify MigrateH2CachesLocalDiskIT.isClassBoundWithName(Entry) to be compatible with both implementations. [1] https://chronicle.software/chronicle-support-java-17/ Bug: Issue 306464780 Change-Id: I3e201d9638de7007aca2af10796a8ee1deb9d04c
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
Note that in order to run on JDK 17 (or newer) the following parameters needs to be added to $GERRIT_SITE/etc/gerrit.config
:
[container] javaOptions = --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED javaOptions = --add-exports=java.base/sun.nio.ch=ALL-UNNAMED javaOptions = --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED javaOptions = --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED javaOptions = --add-opens=jdk.compiler/com.sun.tools.javac=ALL-UNNAMED javaOptions = --add-opens=java.base/java.lang=ALL-UNNAMED javaOptions = --add-opens=java.base/java.lang.reflect=ALL-UNNAMED javaOptions = --add-opens=java.base/java.io=ALL-UNNAMED javaOptions = --add-opens=java.base/java.util=ALL-UNNAMED
For further information and supported options, refer to config documentation.
You can check how to migrate from H2 to chronicle-map here.