Skip to content

Commit

Permalink
[FLINK-8559][RocksDB] Release resources if snapshot operation fails
Browse files Browse the repository at this point in the history
This closes apache#5412.
  • Loading branch information
zentol committed Feb 6, 2018
1 parent 5e41eaa commit dbb81ac
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,13 @@ private RunnableFuture<KeyedStateHandle> snapshotIncrementally(
checkpointId,
checkpointTimestamp);

snapshotOperation.takeSnapshot();
try {
snapshotOperation.takeSnapshot();
} catch (Exception e) {
snapshotOperation.stop();
snapshotOperation.releaseResources(true);
throw e;
}

return new FutureTask<KeyedStateHandle>(
new Callable<KeyedStateHandle>() {
Expand Down

0 comments on commit dbb81ac

Please sign in to comment.