Eclipse JGit: Java implementation of Git 4.4.1



This release fixes the following bugs

  • 495505 include.path fails if specified file does not exist 

  • 496262 Using JGit in with Java 7 may cause java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()...

  • 496732 jgit 4.4 fails reading git config with include 

Implement a time based eviction strategy for RepositoryCache.

When Repository.close() decrements the useCount to 0 currently the cache immediately evicted the repository

from WindowCache and RepositoryCache. This led to I/O overhead on busy repositories because pack files and references

are inserted and deleted from the cache frequently. This fix defers the eviction of a repository from the caches until last use

of the repository is older than time to live. The eviction is handled by a background task running periodically.

Add two new configuration parameters:

  • core.repositoryCacheExpireAfter: cache entries are evicted if the cache entry wasn't accessed longer than this time in

    milliseconds or use any of the supported time units
  • core.repositoryCacheCleanupDelay: defines the interval in milliseconds or any of the supported time units

    for running a background task evicting expired cache entries.

    If set to -1 the delay is set to min(repositoryCacheExpireAfter, 10 minutes).

    If set to 0 the time based eviction is switched off and no background task is started.

    If time based eviction is switched off the JVM can still evict cache entries if heap memory is running low.
  • Time units supported:

    -  milliseconds (1 ms, 2 milliseconds)

    - seconds (1 s, 1 sec, 1 second, 2 seconds)

    - minutes (1 m, 1 min, 1 minute, 2 minutes)

    - hours (1 h, 1 hr, 1 hour, 2 hours)

    - days (1 d, 1 day, 2 days)

    - weeks (1 w, 1 week, 2 weeks)

    - months (1 mon, 1 month, 2 months)

    - years (1 y, 1 year, 2 years)