lhotari commented on code in PR #24395: URL: https://github.com/apache/pulsar/pull/24395#discussion_r2134770661
########## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java: ########## @@ -2531,17 +2531,30 @@ protected void handleGetTopicsOfNamespace(CommandGetTopicsOfNamespace commandGet "[{}] Received CommandGetTopicsOfNamespace for namespace [//{}] by {}, size:{}", remoteAddress, namespace, requestId, topics.size()); } - commandSender.sendGetTopicsOfNamespaceResponse(filteredTopics, hash, filterTopics, Review Comment: If a very large buffer is requested, a reason for OOM could be simply that the memory space is fragmented and there isn't an available non-continuos block of memory to be used. A workaround for this problem is to allocate a composite direct buffer. This is the approach used in PrometheusMetricsGenerator: https://github.com/apache/pulsar/blob/9b79d701a2c1067693508515915b5a4504f60916/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java#L368-L388 -- 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...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org