Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Feb 11, 2025

Conversation

guan46
Copy link
Contributor

@guan46 guan46 commented Jan 31, 2025

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
Copy link
Contributor Author

guan46 commented Jan 31, 2025

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

@lhotari
Copy link
Member

lhotari commented Jan 31, 2025

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
Copy link
Member

lhotari commented Jan 31, 2025

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
Copy link
Member

lhotari commented Jan 31, 2025

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.

Copy link
Member

@lhotari lhotari left a comment

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
Copy link
Contributor Author

guan46 commented Feb 1, 2025

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

@lhotari
Copy link
Member

lhotari commented Feb 3, 2025

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
Copy link
Contributor Author

guan46 commented Feb 9, 2025

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

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

@lhotari
Copy link
Member

lhotari commented Feb 9, 2025

/pulsarbot rerun-failure-checks

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

@lhotari
Copy link
Member

lhotari commented Feb 11, 2025

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2025

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
52 checks passed
lhotari pushed a commit that referenced this pull request Feb 11, 2025
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