This version fixed JGit regression, causing severe (>10x)
performance degradation on huge repositories (>2GB) on git
push and CPU consumption explosion during replication: [1].
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=465509
Bug: Issue 3300
Change-Id: I6b1fa985fa3738801d3fa27d690a1c02c1afc1db
This version of JGit logs IOExceptions caught while accessing pack files
and only removes affected packs from the pack list if we know that the
pack is corrupt. Other IOExceptions could be transient hence JGit
doesn't remove the affected pack from the list anymore to avoid the
problem reported on the Gerrit list [1]. It looks like in the reported
case the pack was removed from the pack list causing
MissingObjectExceptions which disappear when the server is restarted.
[1] https://groups.google.com/forum/#!topic/repo-discuss/Qdmbl-YZ4NU
Bug: issue 3094
Change-Id: I3cf36e1c2000f42652053ada712eccb955e99390
This JGit version fixes:
- Bug 420915 - jgit gc hangs in partitionTasks with a very small repo
- Bug 427107 - cannot push anymore
The latter was observed by CollabNet to break Gerrit replication if gc
created a bitmap index which may have induced PackWriterBitmapWalker.
findObjects() to throw a MissingObjectException.
This version of JGit also fixes the recursive merger on all storage
systems. Objects created during the virtual base construction of a
recursive merge must be written out somewhere and made available
through an ObjectReader for later passes to work on.
In both local filesystem and DFS implementations Gerrit was no-op'ing
the inserter in dry-run mode, causing these objects to be lost and
unavailable during the later processing stages of the merger. With a
virtual common ancestor tree or blob missing, the dry-run merger fails
and a spurious merge conflict is reported.
Instead build a non-flushing inserter wrapper around a real inserter
for the repository. On local disk (standard storage) this will allow
the virtual base to write loose objects, which may be reclaimed in
about two weeks by the standard `git prune` invoked by `git gc`.
On DFS systems this will create a new pack file and buffer a block of
data in memory before starting to store to persistent storage.
However with no flush() the DfsInserter will attempt to rollback the
pack, which may allow the DFS system to reclaim its storage quickly.
Some implementations of DFS may buffer even more deeply than one
block, making the discard even cheaper for smaller merges.
This update also fixes a potential infinite loop during object
inflation within both the WindowCursor or DfsReader versions of
ObjectReader. Inflation could get stuck if an object's compression
stream within a pack ended at a very precise alignment with the cache
block size. The alignment problem is very rare, as it has taken
several years to identify and track down.
Includes changes done in I9859bd073bd710424e12b8b091abb8278f4f9fcc
on master.
Change-Id: I898ad7d5e836ebae0f8f84b17d0ae74489479ef9
Since JGit 3.1 archive command was implemented. Add it to download
drop down as new line.
The following libraries are introduced in this change:
* jgit-archive (Apache 2)
* commons-compress (Apache 2)
* tukaani-xz (Public domain)
Change-Id: I5f61aac8c434414c73585a9320e84f4430dd111d
This fixes a long standing bug in the copy and rename detection
code where a copied file that is also updating its mode loses its
copy status and breaks the diff display.
Change-Id: I15c4d61ff1489e2c9b17e3b9ca76d9dcc98e26a8
After switching to Eclipse Maven repository for pulling JGit lib, we
have the problem that according to Eclipse release train the JARs have
to be signed. That collids with our jgit patch for diff deserialization.
To rectify that, add `unsign` parameter to maven_jar() function.
Change-Id: Ib7bfa5d16f980a64b887d61a4b4ec325e6ffb0a1
Implement a new build system using Buck[1], Facebook's
open source clone of Google's internal build system.
Pros:
- Concise build language
- Test and build output is concise
- Test failures and stack traces show on terminal
- Reliable incrementals; clean is unnecessary
- Extensible with simple blocks of Python
- Fast
buck: clean: 0.452s, full 1m21.083s [*], no-op: 7.145s,
mvn: clean: 4.596s, full 2m53.776s, no-op: 59.108s,
[*] full build includes downloading all dependencies,
time can vary due to remote server performance.
Cons:
- No Windows support
- No native Maven Central support (added by macros)
- No native GWT, Prolog, or WAR support (added by macros)
- Bootstrap of buck requires Ant
Getting started:
git clone https://gerrit.googlesource.com/buck
cd buck
ant
Mac OS X:
PATH="`pwd`/bin:/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands:$PATH"
Linux:
PATH="`pwd`/bin:$PATH"
Importing into Eclipse:
$ time buck build :eclipse
0m48.949s
Import existing project from `pwd`
Import 'gerrit' (do not import other Maven based projects)
Expand 'gerrit'
Right click 'buck-out' > Properties
Under Attributes check 'Derived'
If the code doesn't currently compile but an updated classpath
is needed, refresh the configs and obtain missing JARs:
$ buck build :eclipse_project :download
Running JUnit tests:
$ time buck test --all -e slow # skip slow tests
0m19.320s
$ time buck test --all # includes acceptance tests
5m17.517s
Building WAR:
$ buck build :gerrit
$ java -jar buck-out/gen/gerrit.war
Building release:
$ buck test --all && buck build :api :release
$ java -jar buck-out/gen/release.war
$ ls -lh buck-out/gen/{extension,plugin}-api.jar
Downloading dependencies:
Dependencies are normally downloaded automatically, but Buck can
inspect its graph and download missing dependencies so future
compiles can run without the network:
$ buck build :download
[1] http://facebook.github.io/buck/
Change-Id: I40853b108bd8e153cefa0896a5280a9a5ff81655