kezhuw commented on pull request #15601:
URL: https://github.com/apache/flink/pull/15601#issuecomment-820430611


   Some thoughts on signature of `subtaskReady`:
   1. `void subtaskReady(int subtask, SubtaskGateway gateway)`
   2. `void subtaskReady(int subtask, SubtaskGateway gateway, OperatorEvent 
readyEvent)`
   
   signature#1 is more to say it is ready to send event from task state while 
signature#2 is more to say running operator instance is ready to receive and 
process event.
   
   Theoretically with signature#1, subtask could ready before any 
methods(except constructor) of `AbstractInvokable` were invoked(eg. 
`StreamOperator`s were not open to function). This means that in most 
cases(possible all `StreamOperator` cases), coordinator will still need a ready 
event to sending events. This is why I am a bit prefer signature#2. But given 
that `dispatchOperatorEvent` is bound to `AbstractInvokable` which could be 
capable to function after constructed. For example, 
`CoordinatorEventsExactlyOnceITCase.EventCollectingTask` is capable to process 
event after constructed. I think it might also be reason to go with 
signature#1. 
   
    


-- 
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:
us...@infra.apache.org


Reply via email to