lindong28 commented on PR #21690: URL: https://github.com/apache/flink/pull/21690#issuecomment-1396411041
> For example: MultipleInputStreamTask[1] and OneInputStreamTask[2] have corresponding CheckpointBarrierHandler, if MultipleInputStreamTask calls CheckpointBarrierHandler of OneInputStreamTask, there should be similar bugs. Indeed, ultimately the caller will have to choose the right caller instance. On the other hand, the interface or abstract method is typically expected to have clean and self-contained semantics so that it de-couples the caller from the method implementation as much as possible. `boolean DataOutput#emitRecord` indeed would work as long as it is always called by the same StreamTask instance that constructed it. But it adds more coupling here and you would have to explain this API's behavior based on who is the caller and who constructed this DataOutput, which IMO is an anti-pattern for abstract/interface methods. If you both think that this approach is cleaner and it is OK to have an abstract method's semantics depend on its caller, I am fine to stop here and let this PR in. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org