wsry commented on a change in pull request #13924:
URL: https://github.com/apache/flink/pull/13924#discussion_r602854512
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/SortMergeSubpartitionReader.java
##########
@@ -176,21 +204,28 @@ public void resumeConsumption() {
@Override
public Throwable getFailureCause() {
- // we can never throw an error after this was created
- return null;
+ synchronized (lock) {
+ return failureCause;
+ }
}
@Override
public boolean isAvailable(int numCreditsAvailable) {
- if (numCreditsAvailable > 0) {
- return !buffersRead.isEmpty();
- }
+ synchronized (lock) {
+ if (isReleased) {
+ return true;
Review comment:
Because after fail the ResultSubpartitionView, we rely on the netty
thread to poll the error and propagate the error to the downstream task. If not
set the ResultSubpartitionView as available, the netty thread will not poll the
ResultSubpartitionView.
For the existing blocking channel, because netty thread read the data, if
netty thread encounters any exception, it will directly notifies the downstream
task. For pipelined case, the upstream task will trigger failover and the
downstream tasks will be canceled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]