]> source.dussan.org Git - jgit.git/commit
Don't invalidate pack file on InterruptedIOException 88/48288/3
authorSaša Živkov <sasa.zivkov@sap.com>
Wed, 20 May 2015 14:57:24 +0000 (16:57 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 26 May 2015 08:28:59 +0000 (10:28 +0200)
commitd9062145b8cf7ca3c275e1f8b17eeb4973c55d28
tree8d9cc17219e8960994e3685ae8c595372aa38652
parent39a29fba500a9d691a911a4e55edf29d67d81e8e
Don't invalidate pack file on InterruptedIOException

If the thread reading a pack file is interrupted don't invalidate that
pack file.

This could happen when Gerrit invoked JGit for computing a diff in one
thread and waited for the call to finish from another thread, with a
timeout. When the timeout was reached the "diff" thread was interrupted.
If it happened to be in an IO operation, reading a pack file, an
InterruptedIOException was thrown and the pack file was marked as
invalid and removed from the pack list.

Invalidating the pack in that case could cause the project disappearing in
Gerrit as discussed in [1] and [2].

[1] https://groups.google.com/forum/#!topic/repo-discuss/CYYoHfDxCfA
[2] https://groups.google.com/forum/#!topic/repo-discuss/ZeGWPyyJlrM

Change-Id: I2eb1f98370936b5be541d96d70c3973cbfc39238
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java