flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NicoK <...@git.apache.org>
Subject [GitHub] flink pull request #5572: [FLINK-8694][runtime] Fix notifyDataAvailable race...
Date Mon, 26 Feb 2018 13:30:53 GMT
Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5572#discussion_r170574788
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/SpillableSubpartitionView.java
---
    @@ -242,6 +239,22 @@ public boolean nextBufferIsEvent() {
     		return spilledView.nextBufferIsEvent();
     	}
     
    +	@Override
    +	public boolean isAvailable() {
    +		synchronized (buffers) {
    +			if (nextBuffer != null) {
    +				return true;
    +			}
    +			else if (spilledView == null) {
    +				return false;
    +			}
    +		} // else: spilled
    +
    +		checkState(spilledView != null, "No in-memory buffers available, but also nothing spilled.");
    --- End diff --
    
    Maybe I see something wrong here, but isn't `spilledView` always non-`null` here? In that
case, please remove the check.


---

Mime
View raw message