Skip to content

Commit

Permalink
pool: don't treat InterruptedIOException as a disk IO error
Browse files Browse the repository at this point in the history
Motivation:
When a thread performing I/O get interrupted, then
InterruptedIOException might be thrown. DCAP mover will treat such
exception as a disk I/O error and propagate as such, thus, disabling the
pool.

Modification:
treat InterruptedIOException as interrupt and cancel only the mover.

Result:
reduce false positive disk IO errors.

Acked-by: Lea Morschel
Target: master, 10.1, 10.0, 9.2
Require-book: no
Require-notes: yes
(cherry picked from commit fb734fb)
Signed-off-by: Tigran Mkrtchyan <[email protected]>
  • Loading branch information
kofemann authored and lemora committed Oct 7, 2024
1 parent 8c9ff6b commit 297eac0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import dmg.cells.nucleus.CellPath;
import java.io.EOFException;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
Expand Down Expand Up @@ -730,7 +731,7 @@ private void doTheReadv(RepositoryChannel fileChannel, DCapOutputByteBuffer cntO
if (rc <= 0) {
break;
}
} catch (ClosedByInterruptException ee) {
} catch (ClosedByInterruptException | InterruptedIOException ee) {
// clear interrupted state
Thread.interrupted();
throw new InterruptedException(ee.getMessage());
Expand Down Expand Up @@ -924,7 +925,7 @@ private void doTheWrite(RepositoryChannel fileChannel,

_bigBuffer.flip();
bytesAdded += fileChannel.write(_bigBuffer);
} catch (ClosedByInterruptException ee) {
} catch (ClosedByInterruptException | InterruptedIOException ee) {
// clear interrupted state
Thread.interrupted();
throw new InterruptedException(ee.getMessage());
Expand Down

0 comments on commit 297eac0

Please sign in to comment.