commit | fd7dc049dd0c62286512f18c2edab185f121cbf6 | [log] [tgz] |
---|---|---|
author | Thomas Dräbing <thomas.draebing@sap.com> | Tue Apr 16 13:03:10 2024 +0200 |
committer | Thomas Dräbing <thomas.draebing@sap.com> | Mon Apr 22 13:32:23 2024 +0000 |
tree | d515b8d58ea82f6aafb677d624758a373088311c | |
parent | 21259e7e8430794cc369ede98ca94b1f0c09493d [diff] |
Retry on lock failure during change update Gerrit did not retry if posting a review failed with a lock failure thrown by the global refdb implementation. Thus, in case the lock in the global refdb could not be acquired, the ref-update was aborted after the first try. This could lead to a lot of failed updates like reviews, affecting especially users on very active repositories. An ExceptionHook has been added that will cause Gerrit to retry, if a GlobalRefDbLockException is being thrown. This ExceptionHook has to be bound by every plugin that wants to make use of the Global RefDB. Bug: Issue 334278785 Change-Id: I3518ba9187761f8475233867ed8a3212713c9079
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.