Skip to content

Commit

Permalink
[FLINK-21072][hotfix] Clear resources in HeapSnapshotStrategy
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidwys committed Jan 28, 2021
1 parent 2596c12 commit 6cc2c72
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,20 @@ static class HeapSnapshotResources implements SnapshotResources {
private final Map<StateUID, Integer> stateNamesToId;

HeapSnapshotResources(
List<StateMetaInfoSnapshot> metaInfoSnapshots,
Map<StateUID, StateSnapshot> cowStateStableSnapshots,
Map<StateUID, Integer> stateNamesToId) {
@Nonnull List<StateMetaInfoSnapshot> metaInfoSnapshots,
@Nonnull Map<StateUID, StateSnapshot> cowStateStableSnapshots,
@Nonnull Map<StateUID, Integer> stateNamesToId) {
this.metaInfoSnapshots = metaInfoSnapshots;
this.cowStateStableSnapshots = cowStateStableSnapshots;
this.stateNamesToId = stateNamesToId;
}

@Override
public void release() {}
public void release() {
for (StateSnapshot stateSnapshot : cowStateStableSnapshots.values()) {
stateSnapshot.release();
}
}

public List<StateMetaInfoSnapshot> getMetaInfoSnapshots() {
return metaInfoSnapshots;
Expand Down

0 comments on commit 6cc2c72

Please sign in to comment.