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 04:59:44 UTC

[GitHub] [pulsar] tjiuming opened a new pull request, #17605: [monitoring][broker][fix] Fix EntryFilter stats

tjiuming opened a new pull request, #17605:
URL: https://github.com/apache/pulsar/pull/17605

   Fixes https://github.com/apache/pulsar/issues/17595
   ### Motivation
   
   Fix https://github.com/apache/pulsar/issues/17595 when no EntryFilters configured
   
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
   
   - [x] `doc-not-needed` 
   (Please explain why)
   
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)
   


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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
tjiuming commented on code in PR #17605:
URL: https://github.com/apache/pulsar/pull/17605#discussion_r969830152


##########
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:
   yes I agree and fixed



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


[GitHub] [pulsar] tjiuming commented on pull request #17605: [monitoring][broker][fix] Fix EntryFilter stats

Posted by GitBox <gi...@apache.org>.
tjiuming commented on PR #17605:
URL: https://github.com/apache/pulsar/pull/17605#issuecomment-1246275891

   /pulsarbot rerun-failure-checks


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


[GitHub] [pulsar] nicoloboschi merged pull request #17605: [monitoring][broker][fix] Fix EntryFilter stats

Posted by GitBox <gi...@apache.org>.
nicoloboschi merged PR #17605:
URL: https://github.com/apache/pulsar/pull/17605


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


[GitHub] [pulsar] tjiuming commented on pull request #17605: [monitoring][broker][fix] Fix EntryFilter stats

Posted by GitBox <gi...@apache.org>.
tjiuming commented on PR #17605:
URL: https://github.com/apache/pulsar/pull/17605#issuecomment-1244909882

   @michaeljmarshall @codelipenghui PTAL


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


[GitHub] [pulsar] tjiuming commented on pull request #17605: [monitoring][broker][fix] Fix EntryFilter stats

Posted by GitBox <gi...@apache.org>.
tjiuming commented on PR #17605:
URL: https://github.com/apache/pulsar/pull/17605#issuecomment-1245057997

   > if there are some markers, the `filterProcessCount` will be not equal with `rejectedCount + rescheduledCount + acceptCount`, which may cause misunderstanding.
   
   @gaoran10 could you please describe more detail?
   
   


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