commit | fce05db6e433f37aa230a55451bb168525c93493 | [log] [tgz] |
---|---|---|
author | Dave Borowitz <dborowitz@google.com> | Tue Jan 12 16:44:43 2016 -0500 |
committer | Dave Borowitz <dborowitz@google.com> | Tue Feb 16 15:07:48 2016 +0000 |
tree | f8f501180790684f759a5a6a043f4cfc5c3ca0f2 | |
parent | b6d60b137831e0e07ff108810c026dbfb9bf3160 [diff] |
Don't aggressively flush objects when merging This is a long story. We originally tried this about a year ago with Ia85c5114, but that was doomed (reverted in Id691318a) as we couldn't guarantee PatchSet objects wouldn't be written before the inserter was flushed. That experience directly led to the introduction of BatchUpdate in I0771f5e8, which finally culminated in converting MergeOp to BatchUpdate in I1d9883a5[1]. Now, we can close the door on this chapter and finally avoid flushing each new commit as soon as it's created. It is now easy to prove that no PatchSets are written pointing to new SHA-1s before they are flushed, since commits are created in updateRepo and patch sets are updated in updateChange. The lone exception is in CherryPickChange, where the BatchUpdate creation can't easily be hoisted higher, because we have to parse objects from the repo in order to determine which Change.Id the operation applies to. But here we can ensure flushing happens by passing the same ObjectInserter to any BatchUpdates. This should substantially improve performance of all merge strategies that create one commit per submitted change (MergeAlways, CherryPick, RebaseIfNecessary), particularly on slow backends. [1] The astute reader will notice I have also justified the existence of BatchUpdate as making the notedb transition easier by being one place to create ChangeUpdates, enforce ordering, eventually have retry logic, etc. That is all true, but it turns out it's not the original motivation. Change-Id: Icba6262383088fe24b81ec7159511d80ae31724e
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 IRC channel on freenode is #gerrit. An archive is available at: echelog.com.
The Developer Mailing list is repo-discuss on Google Groups.
Gerrit is provided under the Apache License 2.0.
Install Buck and run the following:
git clone --recursive https://gerrit.googlesource.com/gerrit cd gerrit && buck 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>]
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.