Rollback ref update when global-refdb update failure

Reference update contains two updates: local repository update
and global-refdb. Failure of the global-refdb update cause split
brain because local repository is ahead of the global-refdb. To
mitigate the problem, rollback local repository update when
global-refdb update fails.

Also for split brain always rollback the ref-update and return
LOCK_FAILURE regardless of the enforcement policy.

Bug: Issue 14028
Change-Id: Ia7cc54a5b32fa2997cfb4673cb768fe43107b02a
8 files changed
tree: 1943fab8a8521af2a097a65fa2811a468a8bafc5
  1. src/
  2. .gitignore
  3. bindings.md
  4. BUILD
  5. config.md
  6. Jenkinsfile
  7. LICENSE
  8. pom.xml
  9. README.md
README.md

Gerrit interface to a global-refdb

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.

Design

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.

Bindings

In order to consume this library, some Guice bindings need to be registered appropriately. More information in the relevant documentation.