1996fanrui commented on PR #21690: URL: https://github.com/apache/flink/pull/21690#issuecomment-1396379268
Hi @lindong28 It's strange that `MultiInputStreamTask-D` constructed a `DataOutput-C`, and `OneInputStreamTask-B` calls the `DataOutput-C::emitRecord` constructed for `MultiInputStreamTask-D`. I think it should be a bug if it happens. `DataOutput::emitRecord` semantics should be correct if each `StreamTask` calls the corresponding `DataOutput`. If the correct DataOutput is not guaranteed to be called, there will be many problems with the code. For example: `MultipleInputStreamTask`[1] and `OneInputStreamTask`[2] have corresponding `CheckpointBarrierHandler`, if `MultipleInputStreamTask` calls `CheckpointBarrierHandler` of `OneInputStreamTask`, there should be similar bugs. `CheckpointBarrierHandler` is similar. `MultipleInputStreamTask` and `OneInputStreamTask` create different `CheckpointBarrierHandlers`, and then call `checkpointBarrierHandler.processBarrier`. `StreamTask` does not need to care about the logic inside `checkpointBarrierHandler.processBarrier`. If there is a `return value`, the caller are only responsible for using the `return value`, and don't care about how the `return value` is generated. Similarly, there may be different return values depending on the StreamTask. [1] https://github.com/apache/flink/blob/0b8a83ce54d39d0d5a5b82573c5037f306e9f7f7/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/MultipleInputStreamTask.java#L73 [2] https://github.com/apache/flink/blob/0b8a83ce54d39d0d5a5b82573c5037f306e9f7f7/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OneInputStreamTask.java#L67 -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
