commit | c47560dd4c50440e000a69d0115c3e58c7acccae | [log] [tgz] |
---|---|---|
author | Antonio Barone <syntonyze@gmail.com> | Fri Aug 01 22:14:12 2025 +0300 |
committer | Antonio Barone <syntonyze@gmail.com> | Mon Aug 04 18:41:03 2025 +0300 |
tree | 019331d212aa4ef2bda47b5933a23d7a43cf9a45 | |
parent | dbc4eed6f8f2455a6146da8567177de511feba8d [diff] |
Fix rollback implementation When executing the rollback of a newly created ref due to a global-refdb failure or misalignment, the global-refdb might have persisted loose refs pointing to the zero-id rather than removing the ref itself. Add a logic in the rollback strategy that checks whether the new objectId is the zeroId and perform a delete instead. Bug: Issue 435473094 Change-Id: Ieff087d27b4e361ab6310fa611c79c733455232f
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 bazelsk build plugins/global-refdb
Example:
bazelisk build plugins/global-refdb
The libModule jar file is created under basel-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.