Skip to content

Commit

Permalink
0003214: Close & delete resource if retry command comes through and the
Browse files Browse the repository at this point in the history
create file has been stranded in staging
  • Loading branch information
chenson42 committed Aug 1, 2017
1 parent e6c67fc commit 0f63dd4
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -153,6 +153,9 @@ public void process() throws IOException {
String location = batch.getStagedLocation();
resource = stagingManager.find(category, location, batch.getBatchId());
if (resource == null || resource.getState() == State.CREATE) {
if (resource != null) {
resource.delete();
}
resource = null;
writer = null;
}
Expand Down Expand Up @@ -214,7 +217,6 @@ public void process() throws IOException {

} catch (Exception ex) {
if (resource != null) {
resource.close();
resource.delete();
}

Expand Down

0 comments on commit 0f63dd4

Please sign in to comment.