commit | 42f3e0ead5ae32eb4f2c7077e8b6f2a135f1f5c1 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Thu Mar 30 01:29:41 2023 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Thu Mar 30 01:32:30 2023 +0100 |
tree | 2b473183852b33cfe915f9d310046a8695458ee2 | |
parent | 077c85bd289d5e60fc05249e69f2a27496588ebc [diff] |
Make SharedRefDatabaseWrapper a singleton The SharedRefDatabaseWrapper has optional injections on one of its fields (sharedRefDbDynamicItem) which is resolved at the multi-site and high-availability plugins startup phase. The initial instance created during the plugin startup was injected correctly thanks to the explicit call to inject fields; however, because the SharedRefDatabaseWrapper was not a singleton, the subsequent injections were done without the optional field, causing unexpected behaviours. Having a common singleton everywhere assures that the members injection performed at startup would apply to all uses of SharedRefDatabaseWrapper. Change-Id: Idb32bbd179629221d8d21c2986a1ad4b9f9077bf
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.