)]}'
{
  "commit": "2fbbd6d8902745f00dce74eb92c50b6b8f020e87",
  "tree": "c34889f1ae0a573ea0ac4be3960139ff1959eb60",
  "parents": [
    "8c2dc8b6c0ae6d5993ec57dac8859f3a42f795be"
  ],
  "author": {
    "name": "Petr Hrebejk",
    "email": "hrebejk@seznam.cz",
    "time": "Mon Nov 30 20:19:53 2020 +0100"
  },
  "committer": {
    "name": "Matthias Sohn",
    "email": "matthias.sohn@sap.com",
    "time": "Wed Dec 02 01:43:25 2020 +0100"
  },
  "message": "Fix PackInvalidException when fetch and repack run concurrently\n\nWe are running several servers with jGit. We need to run repack from\ntime to time to keep the repos performant. I.e. after push we test how\nmany small packs are in the repo and when a threshold is reached we run\nthe repack.\n\nAfter upgrading jGit version we\u0027ve found that if someone does the clone\nat the time repack is running the clone sometimes (not always) fails\nbecause the repack removes .pack file used by the clone. Server\nexception and client error attached.\n\nI\u0027ve tracked down the cause and it seems to be introduced between jGit\n5.2 (which we upgraded from) and 5.3 and being caused by this commit:\nMove throw of PackInvalidException outside the catch -\nhttps://github.com/eclipse/jgit/commit/afef866a44cd65fef292c174cad445b3fb526400\n\nThe problem is that when the throw was inside of the try block the last\ncatch block catched the exception and called openFailed(false) method.\nIt is true that it called it with invalidate \u003d false, which is wrong.\nThe real problem though is that with the throw outside of the try block\nthe openFail is not called at all and the fields activeWindows and\nactiveCopyRawData are not set to 0. Which affects the later called tests\nlike: if (++activeCopyRawData \u003d\u003d 1 \u0026\u0026 activeWindows \u003d\u003d 0).\n\nThe fix for this is relatively simple keeping the throw outside of the\ntry block and still having the invalid field set to true. I did\nexhaustive testing of the change running concurrent clones and pushes\nindefinitely and with the patch applied it never fails while without the\npatch it takes relatively short to get the error.\n\nSee: https://www.eclipse.org/lists/jgit-dev/msg04014.html\n\nBug: 569349\nChange-Id: I9dbf8801c8d3131955ad7124f42b62095d96da54\nSigned-off-by: Matthias Sohn \u003cmatthias.sohn@sap.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "88e05af414cad89403eb5dc34ffdf6e2addb9eda",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java",
      "new_id": "86e90c63c5de98252d03ca801d3129c8dec09446",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java"
    }
  ]
}
