commit | 4ee9719e979d2e765599e3ce79cd4a5c8553563d | [log] [tgz] |
---|---|---|
author | David Pursehouse <dpursehouse@digital.ai> | Sat May 16 14:50:44 2020 +0900 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Sat May 16 05:50:44 2020 +0000 |
tree | 58cd5970a3939f3b89793bf89c6eddb9ab7f9460 | |
parent | 64dfc93f22f1c9571d5953b83da713b59416073b [diff] |
Update git submodules * Update plugins/replication from branch 'master' to 3ca941e6bc700c6f40ac45c8f3188c4c48bc8620 - Merge branch 'stable-3.1' * stable-3.1: Fix firing pending "..all.." events on startup Do not block ref-updates during the configuration reload Change-Id: I576ce713fe266caefeb150e3b889e6b254a92725 - Merge branch 'stable-3.0' into stable-3.1 * stable-3.0: Fix firing pending "..all.." events on startup Change-Id: I38cc0318331479695af1eb34bcc8c3a45aec61aa - Merge branch 'stable-2.16' into stable-3.0 * stable-2.16: Fix firing pending "..all.." events on startup Change-Id: I04f042199fd8935bee987b8363956115a40e0872 - Fix firing pending "..all.." events on startup The Destination.wouldPushRef() method is called on startup to see if a Destination is configured to be pushed to for a specific ref, if it is not configured to do so, then firing the pending update is skipped. Since the magic "..all.." ref will never match the configuration in replication.config, always match it since if replication is configured at all, then it should be matched. Bug: Issue 11745 Change-Id: I53bd527932e6aea9ddd465772925d601aa034bd3 (cherry picked from commit 3ddf835c203565dbd415f468e0d40eac1b815c63) - Do not block ref-updates during the configuration reload For setups with a large number of remote configurations, configuration reload can be a time consuming operation. During the reload, the list of all destinations is blocked by a synchronized and thus any ref-update in Gerrit is blocked and cause a general outage until the replication plugin configuration is reloaded. This situation happens because of a ref-update post action GitReferenceUpdatedListener.onGitReferenceUpdated(Event). This is a blocking operation and it is calling another blocking method ReplicationQueue.fire(NameKey,String, String, ReplicationState, boolean) and finally synchronized method DestinationsCollection.getAll(FilterType) is called. If DestinationCollection is during the configuration reload ref-update have to wait on DestinationsCollection.getAll, this is causing general lock for all operations against Gerrit instance. With NoteDb, almost every operation in Gerrit causes a ref-update and, therefore, would be blocked in that chain, causing a unique single sync in the entire Gerrit JVM that can bring an entire server down. Solution to that issue is to remove synchronization on DestinationsCollection.getAll to stop blocking ref-updates. Removing synchronize keyword is still thread safe because we store destinations as an immutable list the only way of updating it is to replace it with a new list. Since it is volatile, the update of destinations is atomic and thread safe. Bug: Issue 12592 Change-Id: Idcba1ef20a0ecde31e6a7ef6d827bf08746e5cb2
Gerrit is a code review and project management tool for Git based projects.
Gerrit makes reviews easier by showing changes in a side-by-side display, and allowing inline comments to be added by any reviewer.
Gerrit simplifies Git based project maintainership by permitting any authorized user to submit changes to the master Git repository, rather than requiring all approved changes to be merged in by hand by the project maintainer.
For information about how to install and use Gerrit, refer to the documentation.
Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.
Please report bugs on the issue tracker.
Gerrit is the work of hundreds of contributors. We appreciate your help!
Please read the contribution guidelines.
Note that we do not accept Pull Requests via the Github mirror.
The Developer Mailing list is repo-discuss on Google Groups.
Gerrit is provided under the Apache License 2.0.
Install Bazel and run the following:
git clone --recurse-submodules https://gerrit.googlesource.com/gerrit cd gerrit && bazel build release
The instruction how to configure GerritForge/BinTray repositories is here
On Debian/Ubuntu run:
apt-get update & apt-get install gerrit=<version>-<release>
NOTE: release is a counter that starts with 1 and indicates the number of packages that have been released with the same version of the software.
On CentOS/RedHat run:
yum clean all && yum install gerrit-<version>[-<release>]
On Fedora run:
dnf clean all && dnf install gerrit-<version>[-<release>]
Docker images of Gerrit are available on DockerHub
To run a CentOS 7 based Gerrit image:
docker run -p 8080:8080 gerritforge/gerrit-centos7[:version]
To run a Ubuntu 15.04 based Gerrit image:
docker run -p 8080:8080 gerritforge/gerrit-ubuntu15.04[:version]
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.