Skip to content

Commit

Permalink
[FLINK-20383][runtime] Fix race condition in notification.
Browse files Browse the repository at this point in the history
Notification happens outside of lock, so between non-null check and actual notification, readView could have been released.
  • Loading branch information
Arvid Heise authored and AHeise committed Nov 27, 2020
1 parent 562e5a4 commit fd23b35
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,14 @@ private boolean shouldNotifyDataAvailable() {
}

private void notifyDataAvailable() {
final PipelinedSubpartitionView readView = this.readView;
if (readView != null) {
readView.notifyDataAvailable();
}
}

private void notifyPriorityEvent(int prioritySequenceNumber) {
final PipelinedSubpartitionView readView = this.readView;
if (readView != null) {
readView.notifyPriorityEvent(prioritySequenceNumber);
}
Expand Down

0 comments on commit fd23b35

Please sign in to comment.