You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/13 13:10:04 UTC

[GitHub] [pulsar] nicoloboschi commented on a diff in pull request #17605: [monitoring][broker][fix] Fix EntryFilter stats

nicoloboschi commented on code in PR #17605:
URL: https://github.com/apache/pulsar/pull/17605#discussion_r969606081


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractBaseDispatcher.java:
##########
@@ -107,6 +107,7 @@ public int filterEntriesForConsumer(Optional<MessageMetadata[]> optMetadataArray
         long totalBytes = 0;
         int totalChunkedMessages = 0;
         int totalEntries = 0;
+        final boolean hasFilter = CollectionUtils.isNotEmpty(entryFilters);
         List<Position> entriesToFiltered = CollectionUtils.isNotEmpty(entryFilters) ? new ArrayList<>() : null;

Review Comment:
   could we put this boolean as a class field and the replace all the `CollectionUtils.isNotEmpty(entryFilters)` ? 



-- 
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-unsubscribe@pulsar.apache.org

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