Copilot commented on code in PR #15651:
URL: https://github.com/apache/pinot/pull/15651#discussion_r2062502414


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/channel/GrpcMailboxServer.java:
##########
@@ -49,24 +55,48 @@ public class GrpcMailboxServer extends 
PinotMailboxGrpc.PinotMailboxImplBase {
   public GrpcMailboxServer(MailboxService mailboxService, PinotConfiguration 
config, @Nullable TlsConfig tlsConfig) {
     _mailboxService = mailboxService;
     int port = mailboxService.getPort();
+
+    PooledByteBufAllocator bufAllocator = new PooledByteBufAllocator(true);
+    PooledByteBufAllocatorMetric metric = bufAllocator.metric();
+
+    // Register memory metrics - use ServerMetrics if available, otherwise use 
BrokerMetrics
+    ServerMetrics serverMetrics = ServerMetrics.get();

Review Comment:
   Consider logging a warning or taking corrective action if both ServerMetrics 
and BrokerMetrics are null to avoid silently missing memory metric 
registrations.



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