Skip to content

[improve][broker] Refactor a private method to eliminate an unnecessary parameter - #23915

Merged
BewareMyPower merged 4 commits into
apache:masterfrom
guan46:0131
Feb 11, 2025
Merged

BewareMyPower merged 4 commits into
apache:masterfrom
guan46:0131

Conversation

@guan46

@guan46 guan46 commented Jan 31, 2025 •

Copy link
Copy Markdown
Contributor

Motivation

  • The canDispatchEntry method uses MutableBoolean as an argument, and then changes its value internally, but this variable is not necessary

Modifications

  • Optimize code for readability

Documentation

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

Matching PR in forked repository

PR in forked repository: guan46#3

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Jan 31, 2025
@guan46

guan46 commented Jan 31, 2025

Copy link
Copy Markdown
Contributor Author

I accidentally closed #23904, I submitted a new pr @lhotari

@lhotari

lhotari commented Jan 31, 2025

Copy link
Copy Markdown
Member

I accidentally closed #23904, I submitted a new pr @lhotari

@guan46 If you accidentially close a PR, it can be reopened. It's better to continue on the original PR. I'll close this one and reopen the original one.

@lhotari lhotari closed this Jan 31, 2025
@lhotari

lhotari commented Jan 31, 2025

Copy link
Copy Markdown
Member

Oh, I see why #23904 was closed. It used your master branch. When creating pull requests, it's necessary to aways create a branch so that you don't run into the issue. I'll reopen this one and let's continue on this PR.

@lhotari lhotari reopened this Jan 31, 2025
@lhotari

lhotari commented Jan 31, 2025

Copy link
Copy Markdown
Member

Oh, I see why #23904 was closed. It used your master branch. When creating pull requests, it's necessary to aways create a branch so that you don't run into the issue. I'll reopen this one and let's continue on this PR.

I updated https://pulsar.apache.org/contribute/personal-ci/ instructions with relevant information.

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please address #23904 (comment) and run tests with Personal CI in your own fork.

@guan46

guan46 commented Feb 1, 2025

Copy link
Copy Markdown
Contributor Author

I updated the address, but there are some errors in the tests.Please take a look. @lhotari

@lhotari

lhotari commented Feb 3, 2025

Copy link
Copy Markdown
Member

I updated the address, but there are some errors in the tests.Please take a look. @lhotari

What you should do is to ensure that tests pass with your changes. If not, it's either a flaky test or your changes break the tests.
For example this test breaks: https://github.com/guan46/pulsar/actions/runs/13072194671/job/36541465274?pr=3#step:11:2705 .

If you think that a test failure could be a flaky test, you can "re-run failed jobs" in the GitHub Actions UI.

For actual test failures caused by your changes, you should run them in IDE and debug the reasons why they fail with your changes. It would be pointless if a contributor makes PRs without handling this step on their own.

@guan46

guan46 commented Feb 9, 2025

Copy link
Copy Markdown
Contributor Author

All the tests of my repo have passed, please take a look @lhotari

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lhotari

lhotari commented Feb 9, 2025

Copy link
Copy Markdown
Member

/pulsarbot rerun-failure-checks

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lhotari

lhotari commented Feb 11, 2025

Copy link
Copy Markdown
Member

/pulsarbot rerun-failure-checks

@codecov-commenter

codecov-commenter commented Feb 11, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.27%. Comparing base (bbc6224) to head (67fb138).
Report is 895 commits behind head on master.

Files with missing lines Patch % Lines
...ersistentStickyKeyDispatcherMultipleConsumers.java 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23915      +/-   ##
============================================
+ Coverage     73.57%   74.27%   +0.69%     
+ Complexity    32624     2378   -30246     
============================================
  Files          1877     1853      -24     
  Lines        139502   143848    +4346     
  Branches      15299    16350    +1051     
============================================
+ Hits         102638   106838    +4200     
+ Misses        28908    28622     -286     
- Partials       7956     8388     +432     
Flag Coverage Δ
inttests 26.75% <40.00%> (+2.16%) ⬆️
systests 23.20% <40.00%> (-1.12%) ⬇️
unittests 73.79% <90.00%> (+0.94%) ⬆️

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

Files with missing lines Coverage Δ
...ersistentStickyKeyDispatcherMultipleConsumers.java 86.27% <90.00%> (+0.63%) ⬆️

... and 1041 files with indirect coverage changes

@BewareMyPower
BewareMyPower merged commit 40a3b38 into apache:master Feb 11, 2025
lhotari pushed a commit that referenced this pull request Feb 11, 2025
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Feb 20, 2025
…ry parameter (apache#23915)

(cherry picked from commit 40a3b38)
(cherry picked from commit 4d00227)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants