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

[cleanup][ml] ManagedCursor clean up. #22246

Merged
merged 4 commits into from
Mar 12, 2024

Conversation

dao-jun
Copy link
Member

@dao-jun dao-jun commented Mar 11, 2024

Motivation

Code clean up.

Modifications

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository:

@dao-jun dao-jun added type/cleanup Code or doc cleanups e.g. remove the outdated documentation or remove the code no longer in use ready-to-test area/ML labels Mar 11, 2024
@dao-jun dao-jun added this to the 3.3.0 milestone Mar 11, 2024
@dao-jun dao-jun requested a review from lhotari March 11, 2024 19:10
@dao-jun dao-jun self-assigned this Mar 11, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Mar 11, 2024
@dao-jun dao-jun marked this pull request as draft March 11, 2024 20:07
@dao-jun dao-jun closed this Mar 12, 2024
@dao-jun dao-jun reopened this Mar 12, 2024
@dao-jun dao-jun marked this pull request as ready for review March 12, 2024 05:44
@dao-jun dao-jun closed this Mar 12, 2024
@dao-jun dao-jun reopened this Mar 12, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.60%. Comparing base (bbc6224) to head (27f0f78).
Report is 36 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #22246      +/-   ##
============================================
+ Coverage     73.57%   73.60%   +0.02%     
- Complexity    32624    32754     +130     
============================================
  Files          1877     1879       +2     
  Lines        139502   139791     +289     
  Branches      15299    15335      +36     
============================================
+ Hits         102638   102892     +254     
- Misses        28908    28914       +6     
- Partials       7956     7985      +29     
Flag Coverage Δ
inttests 26.50% <71.42%> (+1.91%) ⬆️
systests 24.31% <85.71%> (-0.01%) ⬇️
unittests 72.88% <100.00%> (+0.04%) ⬆️

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

Files Coverage Δ
.../org/apache/bookkeeper/mledger/impl/EntryImpl.java 79.26% <100.00%> (+0.78%) ⬆️
...che/bookkeeper/mledger/impl/ManagedCursorImpl.java 79.12% <100.00%> (-0.18%) ⬇️

... and 73 files with indirect coverage changes

Copy link
Member

@nodece nodece left a comment

Choose a reason for hiding this comment

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

LGTM

@dao-jun dao-jun merged commit 532b0d9 into apache:master Mar 12, 2024
50 checks passed
@Technoboy-
Copy link
Contributor

Hi @dao-jun Could you merge the pr at least two reviews approval?

@codelipenghui
Copy link
Contributor

@dao-jun The PR touched the critical path of Pulsar, we should wait for more reviewers to review the PR. If a PR get merged with one reviewer and merged in a few hours, the committers will lost the chance to review your PR and new potential risks might introduce to the Pulsar codebase. Now, so many companies are relaying on the stable release, even if this is a trivial changes to cleanup the managed cursor, give more time for other reviewer will still benefit Pulsar. WDYT?

@dao-jun
Copy link
Member Author

dao-jun commented Mar 13, 2024

@dao-jun The PR touched the critical path of Pulsar, we should wait for more reviewers to review the PR. If a PR get merged with one reviewer and merged in a few hours, the committers will lost the chance to review your PR and new potential risks might introduce to the Pulsar codebase. Now, so many companies are relaying on the stable release, even if this is a trivial changes to cleanup the managed cursor, give more time for other reviewer will still benefit Pulsar. WDYT?

got it

@dao-jun dao-jun deleted the dev/managed_cursor_cleanup branch March 13, 2024 11:19
pgier pushed a commit to pgier/pulsar that referenced this pull request Mar 13, 2024
@lhotari
Copy link
Member

lhotari commented Mar 27, 2024

@dao-jun The PR touched the critical path of Pulsar, we should wait for more reviewers to review the PR. If a PR get merged with one reviewer and merged in a few hours, the committers will lost the chance to review your PR and new potential risks might introduce to the Pulsar codebase. Now, so many companies are relaying on the stable release, even if this is a trivial changes to cleanup the managed cursor, give more time for other reviewer will still benefit Pulsar. WDYT?

got it

@dao-jun It seems that this was merged without more reviews. I added a comment to the commit:
532b0d9#r140287388

does this change have a side-effect where it creates PositionImpl objects? A lot of effort has been put into reducing object allocations so that's why this could be causing a regression in that area.

@dao-jun
Copy link
Member Author

dao-jun commented Mar 27, 2024

@lhotari

It seems that this was merged without more reviews

Yes, my bad

@lhotari
Copy link
Member

lhotari commented Mar 27, 2024

It seems that this was merged without more reviews

Yes, my bad

@dao-jun I'd recommend reverting the change that I have pinpointed in the comment 532b0d9#r140287388 , assuming that it creates new PositionImpl instances which were avoided before this change was made. /cc @codelipenghui

@dao-jun
Copy link
Member Author

dao-jun commented Mar 27, 2024

@lhotari I've replied your comment, 532b0d9#r140303950

lhotari pushed a commit that referenced this pull request Jun 4, 2024
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 7, 2024
(cherry picked from commit 532b0d9)
(cherry picked from commit d9d67da)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 7, 2024
(cherry picked from commit 532b0d9)
(cherry picked from commit d9d67da)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ML cherry-picked/branch-3.0 cherry-picked/branch-3.2 doc-not-needed Your PR changes do not impact docs ready-to-test release/3.0.6 release/3.2.4 type/cleanup Code or doc cleanups e.g. remove the outdated documentation or remove the code no longer in use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants