Skip to content

[Bug] Entry filters stats should not be increased if there's no entry filter  #17595

Closed

Description

@nicoloboschi

Search before asking

  • I searched in the issues and found nothing similar.

Version

2.10.1

Minimal reproduce step

pulsar-admin produce -m hello mytopic
pulsar-admin consume -s sub1 -p Earliest mytopic
pulsar-admin stats mytopic

The result is

...
      "filterProcessedMsgCount" : 1,
      "filterAcceptedMsgCount" : 1,
      "filterRejectedMsgCount" : 0,
      "filterRescheduledMsgCount" : 0,
....

What did you expect to see?

I do expect that if no entry filter has been used by the dispatcher, the filterProcessedMsgCount and filterAcceptedMsgCount metrics should not be increased.

What did you see instead?

The metrics are updated even if there's no entry filter configured

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

  1. added
    type/bug
    on Sep 12, 2022
  2. nicoloboschi commented on Sep 12, 2022

    @nicoloboschi
    ContributorAuthor

    @tjiuming is this intended? #16932

  3. liangyuanpeng commented on Sep 12, 2022

    @liangyuanpeng
    Contributor

    IMO, It might be better if the relevant metrics show -1 without entryFilter.

  4. tjiuming commented on Sep 13, 2022

    @tjiuming
    Contributor

    assign me plz, I'll fix it

  5. tjiuming commented on Sep 13, 2022

    @tjiuming
    Contributor

    A new PR created, #17605

  6. michaeljmarshall commented on Sep 22, 2022

    @michaeljmarshall
    Member

    I do expect that if no entry filter has been used by the dispatcher, the filterProcessedMsgCount and filterAcceptedMsgCount metrics should not be increased.

    I am a bit late on this issue, but one comment is that the naming on that metric is ambiguous and could have been meaningful in the previous design. For example, we filter out certain entries that are system messages even when there are not entry filters. Perhaps we should make sure not to count system messages in the filterProcessedMsgCount counter to prevent them from skewing the numbers for the filter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions