commit | 63de2b5b3147d34a70bc2c9c8761edaa39fdb9a8 | [log] [tgz] |
---|---|---|
author | Antonio Barone <syntonyze@gmail.com> | Tue Sep 17 18:33:24 2024 +0200 |
committer | Antonio Barone <syntonyze@gmail.com> | Tue Sep 24 12:54:14 2024 +0200 |
tree | 4ab0b89ad50d32a19aa17f9952130e427637cec9 | |
parent | 7cb71d017038df98889376a4fb837306c9cc7762 [diff] |
Enforce draftComments when their streaming is enabled Change I02e17592b introduced the possibility to make draft comment events publishing configurable. As a consequence of this, replication mechanisms such as the replication and pull-replication plugins might replicate draft-comments refs on different Gerrit nodes. To avoid split-brain, they have to be treated as any other ref and thus their global status needs to be enforced at a global refdb level. Account for the `event.stream-events.enableDraftCommentEvents` option when evaluating the default policy enforcement for the `draft-comments` ref-space and ignore them only when their streaming is disabled. Bug: Issue 367623925 Change-Id: I269ae1bc928e8e813740ebbed925b94472dc0063
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.