]> source.dussan.org Git - jgit.git/log
jgit.git
3 years agoMerge branch 'stable-5.4' into stable-5.5 30/173230/1
Matthias Sohn [Wed, 2 Dec 2020 14:15:58 +0000 (15:15 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Prepare 5.3.10-SNAPSHOT builds
  JGit v5.3.9.202012012026-r
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: Iede8686198332d6271771bef6eb00c25f1103979
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.3' into stable-5.4 27/173227/1
Matthias Sohn [Wed, 2 Dec 2020 13:26:26 +0000 (14:26 +0100)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Prepare 5.3.10-SNAPSHOT builds
  JGit v5.3.9.202012012026-r
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: I319b54ceffe095add60420c6ae83eac0ba9c14b6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoPrepare 5.3.10-SNAPSHOT builds 25/173225/1
Matthias Sohn [Wed, 2 Dec 2020 12:09:57 +0000 (13:09 +0100)]
Prepare 5.3.10-SNAPSHOT builds

Change-Id: I6f131ad04574bd0d569ae6a59c29ea987be0efb2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoJGit v5.3.9.202012012026-r 89/173189/1 v5.3.9.202012012026-r
Matthias Sohn [Wed, 2 Dec 2020 01:27:44 +0000 (02:27 +0100)]
JGit v5.3.9.202012012026-r

Change-Id: I75e03ef8630d7a369e97be0f797253b968575354
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.2' into stable-5.3 88/173188/1
Matthias Sohn [Wed, 2 Dec 2020 01:18:51 +0000 (02:18 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: If1d8034b5e0cbc004a11a31b228cb5732efb390d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.1' into stable-5.2 87/173187/1
Matthias Sohn [Wed, 2 Dec 2020 01:17:27 +0000 (02:17 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Prepare 5.1.16-SNAPSHOT builds
  JGit v5.1.15.202012011955-r
  Fix PackInvalidException when fetch and repack run concurrently

Change-Id: Id83e29e567646a3945a5b817860ea8f7c3e6e5cf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoPrepare 5.1.16-SNAPSHOT builds 86/173186/1
Matthias Sohn [Wed, 2 Dec 2020 01:02:48 +0000 (02:02 +0100)]
Prepare 5.1.16-SNAPSHOT builds

Change-Id: I50e59e1e73a92fa4fe366398fb8141f5e2e289c1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoJGit v5.1.15.202012011955-r 85/173185/1 v5.1.15.202012011955-r
Matthias Sohn [Wed, 2 Dec 2020 00:53:39 +0000 (01:53 +0100)]
JGit v5.1.15.202012011955-r

Change-Id: Icb4f04a40ab366cbacbb3fdf0db1748f27277fda
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoFix PackInvalidException when fetch and repack run concurrently 40/173040/4
Petr Hrebejk [Mon, 30 Nov 2020 19:19:53 +0000 (20:19 +0100)]
Fix PackInvalidException when fetch and repack run concurrently

We are running several servers with jGit. We need to run repack from
time to time to keep the repos performant. I.e. after push we test how
many small packs are in the repo and when a threshold is reached we run
the repack.

After upgrading jGit version we've found that if someone does the clone
at the time repack is running the clone sometimes (not always) fails
because the repack removes .pack file used by the clone. Server
exception and client error attached.

I've tracked down the cause and it seems to be introduced between jGit
5.2 (which we upgraded from) and 5.3 and being caused by this commit:
Move throw of PackInvalidException outside the catch -
https://github.com/eclipse/jgit/commit/afef866a44cd65fef292c174cad445b3fb526400

The problem is that when the throw was inside of the try block the last
catch block catched the exception and called openFailed(false) method.
It is true that it called it with invalidate = false, which is wrong.
The real problem though is that with the throw outside of the try block
the openFail is not called at all and the fields activeWindows and
activeCopyRawData are not set to 0. Which affects the later called tests
like: if (++activeCopyRawData == 1 && activeWindows == 0).

The fix for this is relatively simple keeping the throw outside of the
try block and still having the invalid field set to true. I did
exhaustive testing of the change running concurrent clones and pushes
indefinitely and with the patch applied it never fails while without the
patch it takes relatively short to get the error.

See: https://www.eclipse.org/lists/jgit-dev/msg04014.html

Bug: 569349
Change-Id: I9dbf8801c8d3131955ad7124f42b62095d96da54
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.4' into stable-5.5 11/172911/1
Matthias Sohn [Fri, 27 Nov 2020 01:37:17 +0000 (02:37 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Remove unused imports
  Silence API warnings
  Remove erraneously merged source features

Change-Id: I25eff574e4c1cd0aef7cf2c685aade2f87fb0409
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoRemove unused imports 05/172905/1
Matthias Sohn [Fri, 27 Nov 2020 01:27:25 +0000 (02:27 +0100)]
Remove unused imports

Change-Id: Id78f4fd7d11a8908f41160a2ab9f3d81b7f771da
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoSilence API warnings 04/172904/1
Matthias Sohn [Fri, 27 Nov 2020 01:26:23 +0000 (02:26 +0100)]
Silence API warnings

Change-Id: I5de476935e79f8f0beefc27885cbc3ffe31c0aed
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoRemove erraneously merged source features 03/172903/1
Matthias Sohn [Fri, 27 Nov 2020 01:20:00 +0000 (02:20 +0100)]
Remove erraneously merged source features

In 5.4 source features were combined into a single feature.

Change-Id: I4055ec805bb036d0f445c8b9b0bb670495a32cc0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.4' into stable-5.5 96/172896/1
Matthias Sohn [Thu, 26 Nov 2020 23:40:00 +0000 (00:40 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Prepare 5.3.9-SNAPSHOT builds
  JGit v5.3.8.202011260953-r
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  Update API warning filters
  Remove unused imports

Change-Id: Icc34f809a3bb019d8d640b9bdb71363e617942e2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.3' into stable-5.4 95/172895/1
Matthias Sohn [Thu, 26 Nov 2020 23:29:39 +0000 (00:29 +0100)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Prepare 5.3.9-SNAPSHOT builds
  JGit v5.3.8.202011260953-r
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  Update API warning filters
  Remove unused imports

Change-Id: I82576ad0f61cf3ff11b54691b32666c61401ad9b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoPrepare 5.3.9-SNAPSHOT builds 94/172894/1
Matthias Sohn [Thu, 26 Nov 2020 15:30:32 +0000 (16:30 +0100)]
Prepare 5.3.9-SNAPSHOT builds

Change-Id: I69f181453c79cef2b4f43fac38d9836917cdc973
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoJGit v5.3.8.202011260953-r 81/172881/1 v5.3.8.202011260953-r
Matthias Sohn [Thu, 26 Nov 2020 14:52:53 +0000 (15:52 +0100)]
JGit v5.3.8.202011260953-r

Change-Id: I7b128942ef224335f415f867c2d9d5da7498ed8b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoMerge branch 'stable-5.2' into stable-5.3 80/172880/1
Matthias Sohn [Thu, 26 Nov 2020 14:37:19 +0000 (15:37 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  Update API warning filters
  Remove unused imports

Change-Id: Id9386846a202b5ae98dd602744963f8897ddaa8c

3 years agoMerge branch 'stable-5.1' into stable-5.2 74/172874/1
Matthias Sohn [Thu, 26 Nov 2020 14:34:08 +0000 (15:34 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Prepare 5.1.15-SNAPSHOT builds
  JGit v5.1.14.202011251942-r
  GC#deleteOrphans: log warning for deleted orphaned files
  GC#deleteOrphans: handle failure to list files in pack directory
  Ensure that GC#deleteOrphans respects pack lock
  Update API warning filters
  Remove unused imports

Change-Id: I91cfe2820c40d2d773cbf018cc2a6c36b062801e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoPrepare 5.1.15-SNAPSHOT builds 73/172873/1
Matthias Sohn [Thu, 26 Nov 2020 14:02:01 +0000 (15:02 +0100)]
Prepare 5.1.15-SNAPSHOT builds

Change-Id: I70246b66c76e865aef4e3adada3a507750ca7c63
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoJGit v5.1.14.202011251942-r 62/172862/1 v5.1.14.202011251942-r
Matthias Sohn [Thu, 26 Nov 2020 00:42:17 +0000 (01:42 +0100)]
JGit v5.1.14.202011251942-r

Change-Id: Ibe124988be39feaa029c3770777126dd87b18abc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoGC#deleteOrphans: log warning for deleted orphaned files 61/172861/4
Matthias Sohn [Wed, 25 Nov 2020 23:58:03 +0000 (00:58 +0100)]
GC#deleteOrphans: log warning for deleted orphaned files

Change-Id: Ie245bf5c8c924dfb1f0f40b8bcdcb1e6f5815526
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoGC#deleteOrphans: handle failure to list files in pack directory 60/172860/3
Matthias Sohn [Wed, 25 Nov 2020 23:24:56 +0000 (00:24 +0100)]
GC#deleteOrphans: handle failure to list files in pack directory

- log an error
- either there is no list or it is incomplete hence return immediately

Change-Id: Ieee5378ca06304056b9ccc30c1acd5f52360052d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
3 years agoEnsure that GC#deleteOrphans respects pack lock 29/172829/8
Matthias Sohn [Wed, 25 Nov 2020 16:00:09 +0000 (17:00 +0100)]
Ensure that GC#deleteOrphans respects pack lock

If pack or index files are guarded by a pack lock (.keep file)
deleteOrphans() should not touch the respective files protected by the
lock file. Otherwise it may interfere with PackInserter concurrently
inserting a new pack file and its index.

The problem was caused by the following race.

All mentioned files are located in  "objects/pack/".
File endings relevant in "pack" dir:
  .pack
  .keep
  .idx
  .bitmap

When ReceivePack receives a pack file it executes the following steps:

ReceivePack.service():
  receivePackAndCheckConnectivity():
    receivePack():
      receive the pack
      parse the pack, returns packLock (.keep file)
      PackInserter.flush():
        write tmpPck file:  "insert_<random>.pack"
        write tmpIdx file:  "insert_<random>.idx"
        real pack name: "pack-<SHA1>.pack"
        real index name: "pack-<SHA1>.idx"
        atomic rename tmpPack to realPack
        atomic rename tmpIdx to tmpIdx
  execute commands
  unlock pack by removing .keep file
  trigger auto gc if enabled

When PackInserter.flush() renames the temporary pack to the final
"pack-xxx.pack" file  the temporary pack index file "insert_xxx.idx"
has no matching .pack file with the same base name for a short interval.
If deleteOrphans() ran during that interval it deduced the pack index
file was orphaned. Subsequently the missing pack index caused
MissingObjectExceptions since objects contained in the pack couldn't be
looked up anymore.

Bug: https://bugs.chromium.org/p/gerrit/issues/detail?id=13544
Change-Id: I559c81e4b1d7c487f92a751bd78b987d32c98719
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoUpdate API warning filters 53/166553/1
Matthias Sohn [Sun, 19 Jul 2020 10:03:14 +0000 (12:03 +0200)]
Update API warning filters

Change-Id: I0fa9c7725ee15da9a932dab0abfb2525d2401149
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoRemove unused imports 52/166552/1
Matthias Sohn [Sun, 19 Jul 2020 10:00:35 +0000 (12:00 +0200)]
Remove unused imports

Change-Id: I7c44e3603df2dd368cb7c0ba0072413b887b6903
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.4' into stable-5.5 30/157530/1
Matthias Sohn [Tue, 11 Feb 2020 22:52:16 +0000 (23:52 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Prepare 5.3.8-SNAPSHOT builds
  JGit v5.3.7.202002110540-r
  Prepare 5.1.14-SNAPSHOT builds
  JGit v5.1.13.202002110435-r

Change-Id: I44b39161f775a52795f6bff312a27227e893651e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.3' into stable-5.4 29/157529/1
Matthias Sohn [Tue, 11 Feb 2020 22:51:38 +0000 (23:51 +0100)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Prepare 5.3.8-SNAPSHOT builds
  JGit v5.3.7.202002110540-r
  Prepare 5.1.14-SNAPSHOT builds
  JGit v5.1.13.202002110435-r

Change-Id: I075f8b8f97a5e97602c058770fe12164af2ce66a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoPrepare 5.3.8-SNAPSHOT builds 82/157482/1
Matthias Sohn [Tue, 11 Feb 2020 10:54:11 +0000 (11:54 +0100)]
Prepare 5.3.8-SNAPSHOT builds

Change-Id: I64ef3b4cf30e87d058001c2c6f1458f4b0c1df00
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoJGit v5.3.7.202002110540-r 81/157481/1 v5.3.7.202002110540-r
Matthias Sohn [Tue, 11 Feb 2020 10:37:34 +0000 (11:37 +0100)]
JGit v5.3.7.202002110540-r

Change-Id: I3ba41af516b9d3b74ac580b3e170ad0e6e0663d4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.2' into stable-5.3 79/157479/1
Matthias Sohn [Tue, 11 Feb 2020 10:26:03 +0000 (11:26 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Prepare 5.1.14-SNAPSHOT builds
  JGit v5.1.13.202002110435-r

Change-Id: I78cbed22c0f0f5872fa44b9a564f6d31dcace582

4 years agoMerge branch 'stable-5.1' into stable-5.2 78/157478/1
Matthias Sohn [Tue, 11 Feb 2020 10:18:12 +0000 (11:18 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Prepare 5.1.14-SNAPSHOT builds
  JGit v5.1.13.202002110435-r

Change-Id: I57fc818e719bc94f90ab1aeb34016eea74d84719
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoPrepare 5.1.14-SNAPSHOT builds 77/157477/1
Matthias Sohn [Tue, 11 Feb 2020 10:12:20 +0000 (11:12 +0100)]
Prepare 5.1.14-SNAPSHOT builds

Change-Id: Ic7d6f1a6c3123af1a1fa782f052b0cea3b6f28c6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoJGit v5.1.13.202002110435-r 75/157475/1 v5.1.13.202002110435-r
Matthias Sohn [Tue, 11 Feb 2020 09:30:36 +0000 (10:30 +0100)]
JGit v5.1.13.202002110435-r

Change-Id: Iedc8699ad1a24efe7ddb47ae919c75b9d36141d4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.4' into stable-5.5 97/156997/1
Matthias Sohn [Sat, 1 Feb 2020 00:41:52 +0000 (01:41 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Fix string format parameter for invalidRefAdvertisementLine
  WindowCache: add metric for cached bytes per repository
  pgm daemon: fallback to user and system config if no config specified
  WindowCache: add option to use strong refs to reference ByteWindows
  Replace usage of ArrayIndexOutOfBoundsException in treewalk
  Add config constants for WindowCache configuration options

Change-Id: I76a62da98182f0c504b1ea8b7d37cecdf4eea7e0

4 years agoMerge branch 'stable-5.3' into stable-5.4 96/156996/1
Matthias Sohn [Sat, 1 Feb 2020 00:28:40 +0000 (01:28 +0100)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Fix string format parameter for invalidRefAdvertisementLine
  WindowCache: add metric for cached bytes per repository
  pgm daemon: fallback to user and system config if no config specified
  WindowCache: add option to use strong refs to reference ByteWindows
  Replace usage of ArrayIndexOutOfBoundsException in treewalk
  Add config constants for WindowCache configuration options

Change-Id: I12002dbfed9dff14fc6d2df9787d92eab5b1fa78

4 years agoMerge branch 'stable-5.2' into stable-5.3 95/156995/1
Matthias Sohn [Sat, 1 Feb 2020 00:14:01 +0000 (01:14 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Fix string format parameter for invalidRefAdvertisementLine
  WindowCache: add metric for cached bytes per repository
  pgm daemon: fallback to user and system config if no config specified
  WindowCache: add option to use strong refs to reference ByteWindows
  Replace usage of ArrayIndexOutOfBoundsException in treewalk
  Add config constants for WindowCache configuration options

Change-Id: I790098be00ff3f9b8278d54ae4fb7c11311816e9

4 years agoMerge branch 'stable-5.1' into stable-5.2 19/156919/2
David Pursehouse [Fri, 31 Jan 2020 00:12:08 +0000 (09:12 +0900)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Fix string format parameter for invalidRefAdvertisementLine
  WindowCache: add metric for cached bytes per repository
  pgm daemon: fallback to user and system config if no config specified
  WindowCache: add option to use strong refs to reference ByteWindows

Change-Id: I741059a1d0d5950ab5bc16ec70352655ee926a24
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoFix string format parameter for invalidRefAdvertisementLine 18/156918/1
David Pursehouse [Thu, 30 Jan 2020 23:38:24 +0000 (08:38 +0900)]
Fix string format parameter for invalidRefAdvertisementLine

The externalized error message added in f4fc640 ("BasePackConnection:
Check for expected length of ref advertisement", Dec 18, 2019) uses a
malformed string format. Since there is only one formatting argument,
it should be referenced with '{0}' rather than '{1}'.

Change-Id: Ibda864dfb0bb902fe07ae4bba73117b212046e8a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoWindowCache: add metric for cached bytes per repository 73/155173/7
Matthias Sohn [Fri, 3 Jan 2020 17:16:42 +0000 (18:16 +0100)]
WindowCache: add metric for cached bytes per repository

Since ObjectDatabase and PackFile don't know their repository use the
packfile's grand-grand-parent directory as an identifier for the
repository the packfile resides in.

Remove metric for a repository if the number of cached bytes for the
repository drops to 0 in order to ensure the map of cached bytes per
repository doesn't contain repositories which have no data cached in the
WindowCache.

Change-Id: I969ab8029db0a292e7585cbb36ca0baa797da20b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agopgm daemon: fallback to user and system config if no config specified 83/156683/2
Matthias Sohn [Mon, 27 Jan 2020 22:00:57 +0000 (23:00 +0100)]
pgm daemon: fallback to user and system config if no config specified

If a config file is passed via option --config-file then use only the
options defined in that file. This helps to concisely configure the
daemon without side effects from global and system level git configs.

Otherwise fallback to user and system level configs.

Change-Id: I242de248f257579874ad0bfe4882a22502353b1f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoWindowCache: add option to use strong refs to reference ByteWindows 49/155149/5
Matthias Sohn [Fri, 13 Dec 2019 00:18:12 +0000 (01:18 +0100)]
WindowCache: add option to use strong refs to reference ByteWindows

Java GC evicts all SoftReferences when the used heap size comes close to
the maximum heap size. This means peaks in heap memory consumption can
flush the complete WindowCache which was observed to have negative
impact on performance of upload-pack in Gerrit.

Hence add a boolean option core.packedGitUseStrongRefs to allow using
strong references to reference packfile pages cached in the WindowCache.

If this option is set to true Java gc can no longer flush the
WindowCache to free memory if the used heap comes close to the maximum
heap size. On the other hand this provides more predictable performance.

Bug: 553573
Change-Id: I9de406293087ab0fa61130c8e0829775762ece8d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.1' into stable-5.2 12/155912/2
David Pursehouse [Wed, 15 Jan 2020 11:03:28 +0000 (20:03 +0900)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Replace usage of ArrayIndexOutOfBoundsException in treewalk
  Add config constants for WindowCache configuration options

Change-Id: I17da3c5183eca536aa2be3972bc5df45c9d75f1b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoReplace usage of ArrayIndexOutOfBoundsException in treewalk 32/155532/3
Patrick Hiesel [Thu, 9 Jan 2020 09:23:12 +0000 (10:23 +0100)]
Replace usage of ArrayIndexOutOfBoundsException in treewalk

Using exceptions during normal operations - for example with the
desire of expanding an array in the failure case - can have a
severe performance impact. When exceptions are instantiated,
a stack trace is collected. Generating stack trace can be expensive.

Compared to that, checking an array for length - even if done many
times - is cheap since this is a check that can run in just a
handful of CPU cycles.

Change-Id: Ifaf10623f6a876c9faecfa44654c9296315adfcb
Signed-off-by: Patrick Hiesel <hiesel@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.4' into stable-5.5 38/155538/1
Matthias Sohn [Thu, 9 Jan 2020 11:32:03 +0000 (12:32 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Fix API problem filters
  Fix unclosed resource warning in SmartOutputStream
  JschConfigSessionFactory: fix boxing warning
  SshSupport#runSshCommand: don't throw exception in finally block
  Don't override already managed maven-compiler-plugin version
  Remove unused import from CreateFileSnapshotBenchmark
  Remove duplicate ignore_optional_problems entry in .classpath
  Update maven-site-plugin used by benchmark module to 3.8.2
  Add dependency to enable site generation for benchmark module
  Ignore warnings for generated source code in
org.eclipse.jgit.benchmark
  Fix MBean registration
  Enhance WindowCache statistics

Change-Id: I78902d5feecb2c09134b64ec2f3b48b2c3bab37d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.3' into stable-5.4 36/155536/1
Matthias Sohn [Thu, 9 Jan 2020 10:38:28 +0000 (11:38 +0100)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Fix API problem filters
  Fix unclosed resource warning in SmartOutputStream
  JschConfigSessionFactory: fix boxing warning
  SshSupport#runSshCommand: don't throw exception in finally block
  Don't override already managed maven-compiler-plugin version
  Remove unused import from CreateFileSnapshotBenchmark
  Remove duplicate ignore_optional_problems entry in .classpath
  Update maven-site-plugin used by benchmark module to 3.8.2
  Add dependency to enable site generation for benchmark module
  Ignore warnings for generated source code in
org.eclipse.jgit.benchmark
  Fix MBean registration
  Enhance WindowCache statistics

Change-Id: I1b560b36d169cfa02cc5450ad0fa0bd85f9f42d8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.2' into stable-5.3 24/155524/1
Matthias Sohn [Thu, 9 Jan 2020 01:19:03 +0000 (02:19 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Fix API problem filters
  Fix unclosed resource warning in SmartOutputStream
  JschConfigSessionFactory: fix boxing warning
  SshSupport#runSshCommand: don't throw exception in finally block
  Don't override already managed maven-compiler-plugin version
  Remove unused import from CreateFileSnapshotBenchmark
  Remove duplicate ignore_optional_problems entry in .classpath
  Update maven-site-plugin used by benchmark module to 3.8.2
  Add dependency to enable site generation for benchmark module
  Ignore warnings for generated source code in
org.eclipse.jgit.benchmark
  Fix MBean registration
  Enhance WindowCache statistics

Change-Id: I67a07d92718188bdf7f8a13b83e9f538ecf4b22f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.1' into stable-5.2 23/155523/1
Matthias Sohn [Thu, 9 Jan 2020 01:03:45 +0000 (02:03 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Fix unclosed resource warning in SmartOutputStream
  JschConfigSessionFactory: fix boxing warning
  SshSupport#runSshCommand: don't throw exception in finally block
  Don't override already managed maven-compiler-plugin version
  Remove unused import from CreateFileSnapshotBenchmark
  Remove duplicate ignore_optional_problems entry in .classpath
  Update maven-site-plugin used by benchmark module to 3.8.2
  Add dependency to enable site generation for benchmark module
  Ignore warnings for generated source code in
org.eclipse.jgit.benchmark
  Fix MBean registration
  Enhance WindowCache statistics

Change-Id: Ic90aacf1ea40e13dc564d4d659e79535e86d0300
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoFix API problem filters 22/155522/1
Matthias Sohn [Sat, 4 Jan 2020 12:01:39 +0000 (13:01 +0100)]
Fix API problem filters

Change-Id: Icc78570f949ad64beb58caa192c829e536aa8dad
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoAdd config constants for WindowCache configuration options 48/155148/2
Matthias Sohn [Thu, 2 Jan 2020 23:52:37 +0000 (00:52 +0100)]
Add config constants for WindowCache configuration options

Change-Id: Icc5265f87ae58aa1e667ed1827075c4a30f75c32
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoFix unclosed resource warning in SmartOutputStream 12/155212/2
Matthias Sohn [Sat, 4 Jan 2020 16:03:52 +0000 (17:03 +0100)]
Fix unclosed resource warning in SmartOutputStream

Change-Id: Ia4b96ae1c2cc9357802487384ee32a80ed40334b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoJschConfigSessionFactory: fix boxing warning 11/155211/2
Matthias Sohn [Sat, 4 Jan 2020 15:06:54 +0000 (16:06 +0100)]
JschConfigSessionFactory: fix boxing warning

Change-Id: I1735033c56b444a9a7160cb7df89292a228d5b34
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoSshSupport#runSshCommand: don't throw exception in finally block 10/155210/2
Matthias Sohn [Sat, 4 Jan 2020 14:44:19 +0000 (15:44 +0100)]
SshSupport#runSshCommand: don't throw exception in finally block

The CommandFailedException which was thrown in finally block is silently
discarded [1]. Refactor this method to throw the exception after the
finally block.

This fixes the warning "Null comparison always yields false: The
variable failure can only be null at this location".

[1] https://wiki.sei.cmu.edu/confluence/display/java/ERR04-J.+Do+not+complete+abruptly+from+a+finally+block
https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.20.2

Change-Id: Idbfc303d9c9046ab9a43e0d4c6d65d325bdaf0ed
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoDon't override already managed maven-compiler-plugin version 09/155209/1
Matthias Sohn [Sat, 4 Jan 2020 12:15:37 +0000 (13:15 +0100)]
Don't override already managed maven-compiler-plugin version

Change-Id: Ie2cb178cf8d805aadc76a2096bcdde95a146d07c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoRemove unused import from CreateFileSnapshotBenchmark 08/155208/1
Matthias Sohn [Sat, 4 Jan 2020 12:11:06 +0000 (13:11 +0100)]
Remove unused import from CreateFileSnapshotBenchmark

Change-Id: Iad0bcc01ada4252e9ab4f60d4375f98f084f6a5f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoRemove duplicate ignore_optional_problems entry in .classpath 07/155207/1
Matthias Sohn [Sat, 4 Jan 2020 12:10:00 +0000 (13:10 +0100)]
Remove duplicate ignore_optional_problems entry in .classpath

Change-Id: I326377c90af59ecaada7f5185a638726a8e909b7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoUpdate maven-site-plugin used by benchmark module to 3.8.2 69/154769/1
Matthias Sohn [Wed, 18 Dec 2019 14:50:35 +0000 (15:50 +0100)]
Update maven-site-plugin used by benchmark module to 3.8.2

The benchmark module currently has no parent, adjust the version used
here to the one used by all the other jgit Maven modules.

Change-Id: I8807a694fe23f8f131d1d22a58a3e18874d756cc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoAdd dependency to enable site generation for benchmark module 68/154768/1
Matthias Sohn [Wed, 18 Dec 2019 14:49:18 +0000 (15:49 +0100)]
Add dependency to enable site generation for benchmark module

Change-Id: Iae4524ddc730d57993e9c6d6807282e4b07d1336
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoIgnore warnings for generated source code in org.eclipse.jgit.benchmark 38/154638/1
Matthias Sohn [Mon, 16 Dec 2019 14:22:08 +0000 (15:22 +0100)]
Ignore warnings for generated source code in org.eclipse.jgit.benchmark

The source code in the folder .apt_generated is generated by the JMH
code generator, so there's no point in raising any warnings as this
could only be fixed in the upstream code generator.

Change-Id: I882888e7bf924f9ae74182598fcb91671a5c9818
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoFix MBean registration 94/154494/1
Matthias Sohn [Fri, 13 Dec 2019 16:32:51 +0000 (17:32 +0100)]
Fix MBean registration

Change-Id: I6f6b8641f6c3e8ab9f625594085014272305656a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoEnhance WindowCache statistics 01/153601/6
Matthias Sohn [Sat, 30 Nov 2019 02:38:13 +0000 (03:38 +0100)]
Enhance WindowCache statistics

Add the following statistics
- cache hit count and hit ratio
- cache miss count and miss ratio
- count of successful and failed loads
- rate of failed loads
- load, eviction and request count
- average and total load time

Use LongAdder instead of AtomicLong to implement counters in order to
improve scalability.

Optionally expose these metrics via JMX, they are registered with the
platform MBean server if the config option jmx.WindowCacheStats = true
in the user or system level git config.

Bug: 553573
Change-Id: Ia2d5246ef69b9c2bd594a23934424bc5800774aa
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.4' into stable-5.5 82/153382/1
David Pursehouse [Tue, 26 Nov 2019 08:44:06 +0000 (17:44 +0900)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Bazel: Use java_plugin and java_binary from @rules_java in jmh.bzl
  Bazel: Add missing newlines at end of BUILD files

Change-Id: I3dd2554cbad5bb224c2799b6b133fe91ab10abc3
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoMerge branch 'stable-5.3' into stable-5.4 81/153381/1
David Pursehouse [Tue, 26 Nov 2019 08:43:20 +0000 (17:43 +0900)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Bazel: Use java_plugin and java_binary from @rules_java in jmh.bzl
  Bazel: Add missing newlines at end of BUILD files

Change-Id: I21878c42fd9abf7d858b534300df0fffe4bad431
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoMerge branch 'stable-5.2' into stable-5.3 80/153380/1
David Pursehouse [Tue, 26 Nov 2019 08:42:10 +0000 (17:42 +0900)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Bazel: Use java_plugin and java_binary from @rules_java in jmh.bzl
  Bazel: Add missing newlines at end of BUILD files

Change-Id: Ie5e66f2e26c057c81101b0d110f91ea479eb362d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoMerge branch 'stable-5.1' into stable-5.2 79/153379/1
David Pursehouse [Tue, 26 Nov 2019 08:41:04 +0000 (17:41 +0900)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Bazel: Use java_plugin and java_binary from @rules_java in jmh.bzl
  Bazel: Add missing newlines at end of BUILD files

Change-Id: Ic1dc84a6c4a1cf430d329627642583fd6e0d0eaa
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoBazel: Use java_plugin and java_binary from @rules_java in jmh.bzl 64/153364/2
David Pursehouse [Tue, 26 Nov 2019 03:17:52 +0000 (12:17 +0900)]
Bazel: Use java_plugin and java_binary from @rules_java in jmh.bzl

Change-Id: I80456f74bc17a1ebb0248fce8050a4cb07bf18f1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoBazel: Add missing newlines at end of BUILD files 63/153363/2
David Pursehouse [Tue, 26 Nov 2019 03:16:47 +0000 (12:16 +0900)]
Bazel: Add missing newlines at end of BUILD files

Change-Id: I11afc45141da988e28382898246995f6b45eb09c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
4 years agoFix NPE in SystemReader in tests 67/152467/1
Thomas Wolf [Tue, 12 Nov 2019 08:38:04 +0000 (09:38 +0100)]
Fix NPE in SystemReader in tests

SystemReader.updateAll() must _not_ test whether the file exists. In
tests at least there are FileBasedConfigs with a null file. Test
configs should (and do) override isOutdated() to deal with this case.

Change-Id: I56303fe0d56afeb9f2203ee807a92c5dcf3809e9
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
4 years agoBaseReceivePack: Fix the format 55/152355/2
Masaya Suzuki [Fri, 8 Nov 2019 01:17:21 +0000 (17:17 -0800)]
BaseReceivePack: Fix the format

Change-Id: I6136ef5318f81a6feb1267338ca76e60122fd15b
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
4 years agoPrepend hostname to subsection used to store file timestamp resolution 40/150740/9
Matthias Sohn [Mon, 7 Oct 2019 17:05:07 +0000 (19:05 +0200)]
Prepend hostname to subsection used to store file timestamp resolution

This ensures the measured filesystem timestamp resolution will be only
used on the machine where it was measured and avoid errors in case the
~/.jgitconfig file is copied to another machine.

Bug: 551850
Change-Id: Iff2a11be62ca94c3bbe4a955182988dc50852f9f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoStore filesystem timestamp resolution in extra jgit config 39/150739/9
Matthias Sohn [Mon, 7 Oct 2019 15:58:56 +0000 (17:58 +0200)]
Store filesystem timestamp resolution in extra jgit config

This avoids polluting hand-crafted user level config with
auto-configured options which might disturb in environments where
the user level config is replicated between different machines.

Add a jgit config as parent of the system level config. Persist
measured timestamp resolutions always in this jgit config and read it
via the user global config. This has the effect that auto-configured
timestamp resolution will be used by default and can be overridden in
either the system level or user level config.

Store the jgit config under the XDG_CONFIG_HOME directory following the
XDG base directory specification [1] in order to ensure that we have
write permissions to persist the file. This has the effect that each OS
user will use its jgit config since they typically use different
XDG_CONFIG_HOME directories.

If the environment variable XDG_CONFIG_HOME is defined the jgit config
file is located at $XDG_CONFIG_HOME/jgit/config otherwise the default is
~/.config/jgit/config.

If you want to avoid redundant measurement for different OS users
manually copy the values measured and auto-configured for one OS user to
the system level git config.

[1] https://wiki.archlinux.org/index.php/XDG_Base_Directory

Bug: 551850
Change-Id: I0022bd40ae62f82e5b964c2ea25822eb55d94687
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoSystemReader: extract updating config and its parents if outdated 47/149947/8
Thomas Wolf [Sat, 21 Sep 2019 12:38:22 +0000 (14:38 +0200)]
SystemReader: extract updating config and its parents if outdated

Change-Id: Ia77f442e47c5670c2d6d279ba862044016aabd86
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.4' into stable-5.5 82/152182/1
Matthias Sohn [Wed, 6 Nov 2019 20:05:07 +0000 (21:05 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Fix benchmark pom.xml to include distribution managment config

Change-Id: I1863f641880e8d9fbd26c02ede6bf5d773e8c8a0

4 years agoMerge branch 'stable-5.3' into stable-5.4 81/152181/1
Matthias Sohn [Wed, 6 Nov 2019 20:02:14 +0000 (21:02 +0100)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Fix benchmark pom.xml to include distribution managment config

Change-Id: Ib4eed75cc8c5146884ce1461e98564de1c759bba

4 years agoMerge branch 'stable-5.2' into stable-5.3 80/152180/1
Matthias Sohn [Wed, 6 Nov 2019 20:00:07 +0000 (21:00 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Fix benchmark pom.xml to include distribution managment config

Change-Id: Icda57b0045ba87d9424615713d7d706697e5c236

4 years agoMerge branch 'stable-5.1' into stable-5.2 79/152179/1
Matthias Sohn [Wed, 6 Nov 2019 19:57:46 +0000 (20:57 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Fix benchmark pom.xml to include distribution managment config

Change-Id: I20e8b7155397771b1bc77e628f535f27458a24bb

4 years agoFix benchmark pom.xml to include distribution managment config 64/152164/2
Matthias Sohn [Wed, 6 Nov 2019 16:49:48 +0000 (17:49 +0100)]
Fix benchmark pom.xml to include distribution managment config

Also fix indentation.

Change-Id: I6d223c493d537bb8aac23c7ddf0a602aff22a3c2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.4' into stable-5.5 59/152059/1
Matthias Sohn [Tue, 5 Nov 2019 15:10:48 +0000 (16:10 +0100)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Run JMH benchmarks using bazel
  Benchmark for creating files and FileSnapshots
  Implement benchmark for looking up FileStore of a given Path
  JMH benchmark for SimpleLruCache
  Update API problem filters
  Remove unused API problem filters
  Silence API errors for new API added since 5.1.0

Change-Id: I071536d630a95e89f5bbbf965a1571b9f5eb81ee
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.3' into stable-5.4 56/152056/1
Matthias Sohn [Tue, 5 Nov 2019 14:42:14 +0000 (15:42 +0100)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Run JMH benchmarks using bazel
  Benchmark for creating files and FileSnapshots
  Implement benchmark for looking up FileStore of a given Path
  JMH benchmark for SimpleLruCache
  Update API problem filters
  Remove unused API problem filters
  Silence API errors for new API added since 5.1.0

Change-Id: Ib735c4039e24ec8b045ae2cc81df1e9e5c9fa996
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.2' into stable-5.3 50/152050/1
Matthias Sohn [Tue, 5 Nov 2019 14:24:54 +0000 (15:24 +0100)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Run JMH benchmarks using bazel
  Benchmark for creating files and FileSnapshots
  Implement benchmark for looking up FileStore of a given Path
  JMH benchmark for SimpleLruCache
  Update API problem filters
  Remove unused API problem filters
  Silence API errors for new API added since 5.1.0

Change-Id: I00615958ab6fbdff601e87a9792aba5606cda12a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoMerge branch 'stable-5.1' into stable-5.2 73/151973/2
Matthias Sohn [Tue, 5 Nov 2019 14:07:39 +0000 (15:07 +0100)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Run JMH benchmarks using bazel
  Benchmark for creating files and FileSnapshots
  Implement benchmark for looking up FileStore of a given Path
  JMH benchmark for SimpleLruCache
  Remove unused API problem filters
  Silence API errors for new API added since 5.1.0

Change-Id: If91c55a192d3b2c441d9c8d414f2e24a7261b1b6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoRun JMH benchmarks using bazel 23/147023/12
Matthias Sohn [Sun, 4 Aug 2019 17:04:41 +0000 (19:04 +0200)]
Run JMH benchmarks using bazel

The benchmarks can be built and run using bazel by running:

$ bazel run //org.eclipse.jgit.benchmarks:benchmarks

Change-Id: I6679750eaa0f2be30ed9d45036e013b0ea4fcc86
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoBenchmark for creating files and FileSnapshots 71/147171/7
Matthias Sohn [Wed, 7 Aug 2019 09:51:30 +0000 (11:51 +0200)]
Benchmark for creating files and FileSnapshots

Change-Id: I953fd8b6b9743b0b9cada244331253eb2121784d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoImplement benchmark for looking up FileStore of a given Path 66/147066/7
Matthias Sohn [Mon, 5 Aug 2019 14:26:20 +0000 (16:26 +0200)]
Implement benchmark for looking up FileStore of a given Path

Results on Mac OS 10.14.6 using APFS:

Result "org.eclipse.jgit.benchmarks.LookupFileStoreBenchmark.testLookupFileStore":
  44583.277 ±(99.9%) 2666.096 ns/op [Average]
  (min, avg, max) = (43707.073, 44583.277, 45320.685), stdev = 692.377
  CI (99.9%): [41917.181, 47249.373] (assumes normal distribution)

Secondary result
"org.eclipse.jgit.benchmarks.LookupFileStoreBenchmark.testLookupFileStore:·stack":
Stack profiler:

....[Thread state
distributions]........................................................
100.0%         RUNNABLE

....[Thread state:
RUNNABLE].............................................................
 42.5%  42.5% sun.nio.fs.UnixNativeDispatcher.realpath0
 37.9%  37.9% sun.nio.fs.UnixNativeDispatcher.stat0
 11.0%  11.0% sun.nio.fs.BsdNativeDispatcher.getfsstat
  7.6%   7.6% sun.nio.fs.BsdNativeDispatcher.fsstatEntry
  0.7%   0.7% sun.nio.fs.BsdNativeDispatcher.endfsstat
  0.1%   0.1% sun.nio.fs.UnixPath.initOffsets
  0.0%   0.0% sun.nio.fs.UnixFileAttributes.get
  0.0%   0.0% java.util.zip.Inflater.inflateBytes
  0.0%   0.0% sun.misc.Unsafe.compareAndSwapInt
  0.0%   0.0% sun.nio.fs.BsdFileStore.findMountEntry

This shows that FS.attrCacheByPath should be useful to reduce overhead
of looking up the FileStore of a given file.

Change-Id: I7213086b42e0453f0ee149660d507dac2a4644cc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoJMH benchmark for SimpleLruCache 22/147022/10
Matthias Sohn [Sat, 3 Aug 2019 10:02:34 +0000 (12:02 +0200)]
JMH benchmark for SimpleLruCache

See [1] for JMH documentation and [2] how to use JMH in Eclipse.

The benchmarks pom currently cannot use the JGit parent pom due to an
ecj bug [3] regarding annotation processing. Hence for now do not
inherit from the JGit parent pom and copy the compiler plugin
configuration for javac from the parent pom.

After running the Maven build the benchmark can be run using Maven:

$ java -jar org.eclipse.jgit.benchmarks/target/benchmarks.jar

or in Eclipse by running the main method of the SimpleLruCacheBenchmark
class.

[1] https://openjdk.java.net/projects/code-tools/jmh/
[2] http://alblue.bandlem.com/Page/3/index.html
[3] https://eclip.se/532029

CQ: 20517
CQ: 20518
Change-Id: Idca8a9e0980f0b8a9c741c4c9e97d03c62f07c8d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoUpdate API problem filters 72/151972/1
Matthias Sohn [Mon, 4 Nov 2019 15:24:55 +0000 (16:24 +0100)]
Update API problem filters

- filter errors for new APIs added in service release
- remove unused filters

Change-Id: Ifbf532b8a3c46d4ed78a38f6c75073a072b7f669
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoRemove unused API problem filters 48/151948/1
Matthias Sohn [Mon, 4 Nov 2019 12:28:23 +0000 (13:28 +0100)]
Remove unused API problem filters

Change-Id: I0ae0fd4919b7ccc5218c6eb0fab22350bb9c9714
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
4 years agoSilence API errors for new API added since 5.1.0 47/151947/1
Matthias Sohn [Mon, 4 Nov 2019 12:25:37 +0000 (13:25 +0100)]
Silence API errors for new API added since 5.1.0

Change-Id: I92a7c1b0319d61aeb25f58048bd07c144068c3db
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.4' into stable-5.5 72/150972/1
David Pursehouse [Sat, 12 Oct 2019 00:39:42 +0000 (09:39 +0900)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Bazel: Bump bazel version to 1.0.0

Change-Id: I967ad9e0fa6f13c5217aafb8faedc4a7dfb37c58
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoMerge branch 'stable-5.3' into stable-5.4 70/150970/1
Matthias Sohn [Fri, 11 Oct 2019 22:28:06 +0000 (00:28 +0200)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Bazel: Bump bazel version to 1.0.0

Change-Id: If07e2ff3281dc96bec206b68631d22be8fd4636a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.2' into stable-5.3 69/150969/1
Matthias Sohn [Fri, 11 Oct 2019 21:43:40 +0000 (23:43 +0200)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Bazel: Bump bazel version to 1.0.0

Change-Id: Ife26567c08ec053741c9db4ca8b5b2836044dcde
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.1' into stable-5.2 68/150968/1
Matthias Sohn [Fri, 11 Oct 2019 18:00:56 +0000 (20:00 +0200)]
Merge branch 'stable-5.1' into stable-5.2

* stable-5.1:
  Bazel: Bump bazel version to 1.0.0

Change-Id: I067d8ebd15f35f139d86bc67473b42afac4f0f53

5 years agoBazel: Bump bazel version to 1.0.0 24/150924/2
David Pursehouse [Fri, 11 Oct 2019 00:41:43 +0000 (09:41 +0900)]
Bazel: Bump bazel version to 1.0.0

Change-Id: I607915af0556efe8b2fb640e9387029b755d1a7f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
5 years agoPrepare 5.5.2-SNAPSHOT builds 25/150525/1
Matthias Sohn [Thu, 3 Oct 2019 00:06:57 +0000 (02:06 +0200)]
Prepare 5.5.2-SNAPSHOT builds

Change-Id: Ief9940182fd6e3f3e2df88e6485be753c1260e6b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.5.1.201910021850-r 23/150523/1 v5.5.1.201910021850-r
Matthias Sohn [Wed, 2 Oct 2019 22:49:02 +0000 (00:49 +0200)]
JGit v5.5.1.201910021850-r

Change-Id: I9930b35b095f638119b4601a8311257daf5e5420
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.4' into stable-5.5 22/150522/1
Matthias Sohn [Wed, 2 Oct 2019 22:47:05 +0000 (00:47 +0200)]
Merge branch 'stable-5.4' into stable-5.5

* stable-5.4:
  Prepare 5.3.7-SNAPSHOT builds
  JGit v5.3.6.201910020505-r
  Prepare 5.1.13-SNAPSHOT builds
  JGit v5.1.12.201910011832-r
  Do not rely on ArrayIndexOutOfBoundsException to detect end of input

Change-Id: Ia1070fd170651ce827bc6b876c6764a44ffe60eb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.3' into stable-5.4 13/150513/1
Matthias Sohn [Wed, 2 Oct 2019 09:36:05 +0000 (11:36 +0200)]
Merge branch 'stable-5.3' into stable-5.4

* stable-5.3:
  Prepare 5.3.7-SNAPSHOT builds
  JGit v5.3.6.201910020505-r
  Prepare 5.1.13-SNAPSHOT builds
  JGit v5.1.12.201910011832-r
  Do not rely on ArrayIndexOutOfBoundsException to detect end of input

Change-Id: Ia621d06a9489ee276c793de9dd4a77f4ff19e2ac
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoPrepare 5.3.7-SNAPSHOT builds 12/150512/1
Matthias Sohn [Wed, 2 Oct 2019 09:23:28 +0000 (11:23 +0200)]
Prepare 5.3.7-SNAPSHOT builds

Change-Id: I3465b6a4d913bfb2864abba58448423e7c262f60
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoJGit v5.3.6.201910020505-r 83/150483/1 v5.3.6.201910020505-r
Matthias Sohn [Wed, 2 Oct 2019 09:03:41 +0000 (11:03 +0200)]
JGit v5.3.6.201910020505-r

Change-Id: I12d1c6af03f2d7474c99c22cd2aabb77e95fcb32
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
5 years agoMerge branch 'stable-5.2' into stable-5.3 81/150481/2
Matthias Sohn [Wed, 2 Oct 2019 08:59:34 +0000 (10:59 +0200)]
Merge branch 'stable-5.2' into stable-5.3

* stable-5.2:
  Prepare 5.1.13-SNAPSHOT builds
  JGit v5.1.12.201910011832-r
  Do not rely on ArrayIndexOutOfBoundsException to detect end of input

Change-Id: I3f11a83e177daefa0a2e91173f70f9547067f713
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>