commit | 989836372c9376324a72cdf00bead7bf89f1bddb | [log] [tgz] |
---|---|---|
author | Thomas Dräbing <thomas.draebing@sap.com> | Tue Apr 16 13:07:37 2024 +0200 |
committer | Thomas Dräbing <thomas.draebing@sap.com> | Mon Apr 22 13:32:04 2024 +0000 |
tree | 0440b44db2bb67b39d5e445f74cb817fcc9ece26 | |
parent | ced68bf56f3c513ae2e6914bf4f0ae165a5b3d69 [diff] |
Consolidate GlobalRefDbLockException and SharedLockException The GlobalRefDbLockException was a RuntimeException that was never handled. It used the same message as SharedLockException, which was never thrown, but checked for in a place, where only a GlobalRefDbLockException could be expected. This change changes the Exception hierarchy, so that SharedLockException inherits from LockFailureException, which also inherits from IOException and is thus not breaking the API. The GlobalRefDbException now inherits from SharedLockException and is thus not a RuntimeException anymore and will thus be handed down to the RetryHelper. The GlobalRefDbException is now only an alias for SharedRefDbException, but was kept to not break the API. Change-Id: Ibba1452e8e426b00b45ee3e6ccb4e0b225e81f79
Global ref-database interface for use with Gerrit Code Review.
Enables the de-coupling between Gerrit, its libModules and the different implementations of a globally shared ref-database.
The design for a global ref-db interface can be found as part of the multi-site design documentation, where it first originated and was approved by the community.
In order to consume this library, some Guice bindings need to be registered appropriately. More information in the relevant documentation.
Global ref-database expose metrics to measure the global ref-database operation latency. List of the available metrics can be found here.
This libModule is built like a Gerrit in-tree plugin, using Bazelisk.
Create a symbolic link of the repository source to the Gerrit source tree /plugins/global-refdb directory.
Example:
git clone https://gerrit.googlesource.com/gerrit git clone https://gerrit.googlesource.com/modules/global-refdb cd gerrit/plugins ln -s ../../global-refdb .
From the Gerrit source tree issue the command bazelisk build plugins/global-refdb
Example:
bazelisk build plugins/global-refdb
The libModule jar file is created under bazel-bin/plugins/global-refdb/global-refdb.jar
To execute the tests run bazelisk test plugins/global-refdb/...
from the Gerrit source tree.
Example:
bazelisk test plugins/global-refdb/...
Add global-refdb
in the CUSTOM_PLUGINS
section of the tools/bzl/plugins.bzl
.
Example:
CUSTOM_PLUGINS = [ "global-refdb", ]
Run tools/eclipse/project.py
for generating or updating the Eclipse project.