Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,19 @@ public ReadData materialize(final long offset, final long length) {
public void close() throws IOException {

if (lock != null) {
lock.close();
try {
lock.close();
} catch (IOException e) {
/* this is a particular case. Sometimes (seemingly only on MacOs, when accessing blocks
* over a SMB mount). Reading succeeds, but closing throws a "Bad File Descriptor" IOException.
* Since the read succeeded, we are willing to ignore this exception. */
boolean ignoreBadFileDescriptorOnClose = e.getMessage().matches("^Bad file descriptor$");

if (!ignoreBadFileDescriptorOnClose) {
throw e;
}

}
lock = null;
}
}
Expand Down
Loading