Skip to content

Commit

Permalink
0003445: Batch extract locks aren't released when
Browse files Browse the repository at this point in the history
"java.lang.IllegalStateException: Had trouble renaming file." occurs.
  • Loading branch information
mmichalek committed Feb 22, 2018
1 parent 3d9e846 commit 4c63eb2
Showing 1 changed file with 9 additions and 6 deletions.
Expand Up @@ -911,13 +911,16 @@ protected OutgoingBatch extractOutgoingBatch(ProcessInfo processInfo, Node targe
resource.delete();
}
throw ex;
} finally {
IStagedResource resource = getStagedResource(currentBatch);
if (resource != null) {
resource.setState(State.DONE);
} finally {
try {
IStagedResource resource = getStagedResource(currentBatch);
if (resource != null) {
resource.setState(State.DONE);
}
} finally {
releaseLock(lock, currentBatch, useStagingDataWriter);
log.debug("{} released lock for batch {}", targetNode.getNodeId(), currentBatch.getBatchId());
}
releaseLock(lock, currentBatch, useStagingDataWriter);
log.debug("{} released lock for batch {}", targetNode.getNodeId(), currentBatch.getBatchId());
}
}

Expand Down

0 comments on commit 4c63eb2

Please sign in to comment.