1u0 commented on a change in pull request #9383: [FLINK-13248] [runtime] Adding 
processing of downstream messages in AsyncWaitOperator's wait loops
URL: https://github.com/apache/flink/pull/9383#discussion_r314741224
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/TaskMailboxImpl.java
 ##########
 @@ -251,4 +278,74 @@ public void quiesce() {
        public State getState() {
                return state;
        }
+
+       @Override
+       public Mailbox getDownstreamMailbox(int priority) {
+               return new DownstreamMailbox(priority);
 
 Review comment:
   Suggestion:
   * make the `-1` constant (in `private DownstreamMailbox downstreamMailbox = 
new DownstreamMailbox(-1);`) a named `static final` field (for example 
`MIN_PRIORITY`);
   * and add validation check here that `checkArgument(priority > 
MIN_PRIORITY)`.
   
   Similarly, you can also add a `MAX_PRIORITY` constant (for example, it can 
be used for task cancellation letter) and additionally check here, that 
operator's priority is `< MAX_PRIORITY`.

----------------------------------------------------------------
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


With regards,
Apache Git Services

Reply via email to