gortiz commented on code in PR #15694:
URL: https://github.com/apache/pinot/pull/15694#discussion_r2073022060


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/GrpcSendingMailbox.java:
##########
@@ -319,4 +279,78 @@ static List<ByteString> toByteStrings(List<ByteBuffer> 
bytes, int maxByteStringS
 
     return result;
   }
+
+  private static abstract class Sender {
+    protected abstract void send(MseBlock block, List<DataBuffer> 
serializedStats)
+        throws IOException;
+  }
+
+  private static class SplitSender extends Sender {
+    private final GrpcSendingMailbox _mailbox;
+
+    public SplitSender(GrpcSendingMailbox mailbox) {
+      _mailbox = mailbox;
+    }
+
+    @Override
+    protected void send(MseBlock block, List<DataBuffer> serializedStats)
+        throws IOException {
+      _mailbox._statMap.merge(MailboxSendOperator.StatKey.RAW_MESSAGES, 1);

Review Comment:
   nit: Given this is repeated in both senders, I don't think it belongs here. 
Probably we can move it to a private send method in GrpccSendingMailbox that 
increases stats and then call Sender.send 



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to