commit | 0390146f7c93833e52de177d69623066d0d3496b | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Tue Oct 19 09:29:49 2021 +0200 |
committer | Edwin Kempin <ekempin@google.com> | Tue Oct 19 10:16:17 2021 +0200 |
tree | 8e042465ae7757566d63ac931290a52351bf9358 | |
parent | c54e2049f1ee32abce14dd527388074389e3f594 [diff] |
ReceiveCommits: Call end() on progress monitor only at the very end After end() has been called on the progress monitor the ReceiveCommits task has 500ms to terminate and return, otherwise MultiProgressMonitor will get a TimeoutException while waiting on the future to return. The 500ms timeout is hard-coded in MultiProgressMonitor. At Google we had some reports of users that got an error on push due to this timeout. At this point the push was already successful, so it's confusing for the user to get an error. Calling end() in ReceiveCommits only at the very end may safe some milliseconds in between calling end() and returning so that hitting this timeout gets less likely. On first sight moving the end() call a few lines down doesn't look like it's safing a lot, but now it's only done after the AutoCloseables from the try-block have been closed. One of the AutoCloseables that is being closed here is the PerformanceLogContext. When it is closed the performance log entries which have been collected during the request are forwarded to the registered PerformanceLoggers which usually persist the performance log entries. Doing this can take a while, so it's better to call end() on the progress monitor only afterwards. Issue: Google b/202848945 Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: Ic466d07c23d33325b6ab4ee6b0dc6d14a82010b8
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 8 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-centos8
To run a Ubuntu 20.04 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-ubuntu20
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.