)]}'
{
  "commit": "83235432e7fd789261cad7729bf3febfc168cd6f",
  "tree": "3786e9892abd2a93938ff6bce0764f8a5d567363",
  "parents": [
    "74743bc547946bf5730b5caa45645804b2226d35"
  ],
  "author": {
    "name": "Hugo Arès",
    "email": "hugo.ares@ericsson.com",
    "time": "Fri Sep 04 15:32:28 2015 -0400"
  },
  "committer": {
    "name": "Matthias Sohn",
    "email": "matthias.sohn@sap.com",
    "time": "Thu Apr 07 11:32:57 2016 +0200"
  },
  "message": "Fix repository cache never closing repository\n\nRepository has a usage counter that is initialized to 1 at\ninstantiation and this counter is decremented when Repository.close\nmethod is called. There is also a Repository.incrementOpen method that\nRepositoryCache uses to increment the usage count when it\u0027s returning a\nrepository that is already opened.\n\nThe problem was that RepositoryCache was incrementing the usage count\nfor repositories that it just opened or registered. The usage count was\n2 when it should have been 1.\n\nIncrementing usage count is now only be done for repository that are\nserved from the cache.\n\nThis bug is causing slow memory increase of our Gerrit server until the\nserver become slow. Even if the RepositoryCache is using SoftReference,\nit seems that the JVM is not garbage collecting the repositories because\nit\u0027s not yet on the edge of being out of memory.\n\nTo test this change, I replicated all repositories(11k) from Gerrit\nmaster to one slave. The Gerrit master used memory after this test was\n10GB without this change and 3.5GB with.\n\nChange-Id: I86c7b36174e384f106b51fe92f306018fd1dbdf0\nSigned-off-by: Hugo Arès \u003chugo.ares@ericsson.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6c6292558e59557d7eb218816716331fde793d2a",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java",
      "new_id": "8f30fd0821e64ff377d2881d51e3a4c9e731dd87",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java"
    },
    {
      "type": "modify",
      "old_id": "f8266133a632b0c68be70245e4958b1ca0003b8a",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java",
      "new_id": "5546b790e8cac193ab9c3f81cc2e897b3b121187",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java"
    },
    {
      "type": "modify",
      "old_id": "23cc264c1cf9786d74f9e1f35049144ccb464a59",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java",
      "new_id": "58771857b6e2404fa5a8293552ad8e33a78a6ac5",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java"
    }
  ]
}
