Skip to content

[improve][broker]Avoid runtime check hasFilter in EntryFilterSupport - #18066

Merged
AnonHxy merged 3 commits into
apache:masterfrom
AnonHxy:opt_entry_filter_hasfilter
Oct 18, 2022
Merged

AnonHxy merged 3 commits into
apache:masterfrom
AnonHxy:opt_entry_filter_hasfilter

Conversation

@AnonHxy

@AnonHxy AnonHxy commented Oct 17, 2022 •

Copy link
Copy Markdown
Contributor

Motivation

A minor improve for entries fiilter by avoid runtime check has filter or not in EntryFilterSupport and make the code more clear.

Modifications

Add a protected final field hasFilter in EntryFilterSupport

Verifying this change

  • Make sure that the change passes the CI checks.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:AnonHxy#10

@AnonHxy AnonHxy self-assigned this Oct 17, 2022
@AnonHxy AnonHxy added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Oct 17, 2022
@AnonHxy AnonHxy added this to the 2.12.0 milestone Oct 17, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Oct 17, 2022
@codecov-commenter

codecov-commenter commented Oct 17, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #18066 (bc0dd23) into master (6c65ca0) will increase coverage by 11.52%.
The diff coverage is 57.69%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #18066       +/-   ##
=============================================
+ Coverage     34.91%   46.44%   +11.52%     
- Complexity     5707    16225    +10518     
=============================================
  Files           607     1360      +753     
  Lines         53396   118342    +64946     
  Branches       5712    12866     +7154     
=============================================
+ Hits          18644    54964    +36320     
- Misses        32119    57811    +25692     
- Partials       2633     5567     +2934     
Flag Coverage Δ
unittests 46.44% <57.69%> (+11.52%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...org/apache/pulsar/broker/ServiceConfiguration.java 52.07% <ø> (ø)
.../pulsar/broker/service/AbstractBaseDispatcher.java 53.20% <ø> (+7.34%) ⬆️
.../service/SystemTopicBasedTopicPoliciesService.java 62.97% <0.00%> (+11.38%) ⬆️
.../pulsar/broker/stats/BrokerOperabilityMetrics.java 100.00% <ø> (+7.35%) ⬆️
...g/apache/pulsar/compaction/CompactedTopicImpl.java 69.28% <0.00%> (+58.57%) ⬆️
...va/org/apache/pulsar/client/impl/ConsumerBase.java 21.95% <0.00%> (ø)
...ache/pulsar/functions/utils/io/ConnectorUtils.java 0.00% <0.00%> (ø)
...ache/pulsar/broker/service/EntryFilterSupport.java 27.02% <50.00%> (+2.02%) ⬆️
...he/pulsar/functions/worker/rest/api/SinksImpl.java 36.82% <50.00%> (ø)
...apache/pulsar/proxy/server/DirectProxyHandler.java 63.63% <50.00%> (ø)
... and 1373 more

@AnonHxy

AnonHxy commented Oct 17, 2022

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

1 similar comment
@AnonHxy

AnonHxy commented Oct 17, 2022

Copy link
Copy Markdown
Contributor Author

/pulsarbot run-failure-checks

@Jason918 Jason918 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HQebupt HQebupt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AnonHxy
AnonHxy merged commit ff44420 into apache:master Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker doc-not-needed Your PR changes do not impact docs type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants