pnowojski commented on a change in pull request #8124: [FLINK-11877] Implement 
the runtime handling of the InputSelectable interface
URL: https://github.com/apache/flink/pull/8124#discussion_r274820408
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/UnionInputGate.java
 ##########
 @@ -197,22 +217,23 @@ public void requestPartitions() throws IOException, 
InterruptedException {
                return Optional.of(bufferOrEvent);
        }
 
-       @Override
-       public Optional<BufferOrEvent> pollNextBufferOrEvent() throws 
UnsupportedOperationException {
-               throw new UnsupportedOperationException();
-       }
-
-       private InputGateWithData waitAndGetNextInputGate() throws IOException, 
InterruptedException {
+       private InputGateWithData waitAndGetNextInputGate(boolean blocking) 
throws IOException, InterruptedException {
 
 Review comment:
   I doubt there would be a measurable difference. You can use existing network 
stack benchmarks to check for that. When I was introducing `Optional` in 
`getNextBufferOrEvent`, there was none. Furthermore since `getNextBufferOrEvent 
` is already using and constructing `Optional`, I'm pretty sure that `Optional` 
in `waitAndGetNextInputGate` would JIT inline to a no-op.
   
   But sure, if you can show that `@Nullable` is faster, then +1 from my side 
for it. Otherwise `Optional` is safer than `@Nullable`.

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


With regards,
Apache Git Services

Reply via email to