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] Close temporary open ledger in BookkeeperBucketSnapshotStorage #20111

Conversation

lifepuzzlefun
Copy link
Contributor

@lifepuzzlefun lifepuzzlefun commented Apr 15, 2023

PIP: #16763

Motivation

add close ledger logic to close temporary opened ledger.

and if close throws exception won't be returned.

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:

method add close ledger logic.
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 15, 2023
@lifepuzzlefun lifepuzzlefun changed the title [improve] [broker] Close temporary ledger in BookkeeperBucketSnapshotStorage [improve] [broker] Close temporary open ledger in BookkeeperBucketSnapshotStorage Apr 15, 2023
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

Good catch!

Copy link
Member

@mattisonchao mattisonchao left a comment

Choose a reason for hiding this comment

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

LGTM,

/cc @coderzc Maybe we can consider caching this ledger to avoid opening it many times. We can close it when we decide to delete this bucket then. WDYT?

@coderzc
Copy link
Member

coderzc commented Apr 16, 2023

LGTM,

/cc @coderzc Maybe we can consider caching this ledger to avoid opening it many times. We can close it when we decide to delete this bucket then. WDYT?

I think this is a good idea.

@coderzc coderzc added this to the 3.0.0 milestone Apr 16, 2023
@coderzc coderzc added area/broker type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages labels Apr 16, 2023
@mattisonchao
Copy link
Member

@lifepuzzlefun Please help fix the CI. thanks!

@lifepuzzlefun
Copy link
Contributor Author

@lifepuzzlefun Please help fix the CI. thanks!

fixed :-)

@coderzc coderzc merged commit b50e880 into apache:master Apr 17, 2023
40 of 41 checks passed
@coderzc coderzc modified the milestones: 3.0.0, 3.1.0 Apr 19, 2023
coderzc pushed a commit that referenced this pull request Apr 20, 2023
cbornet added a commit that referenced this pull request Apr 24, 2023
poorbarcode pushed a commit that referenced this pull request May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker cherry-picked/branch-3.0 doc-not-needed Your PR changes do not impact docs release/3.0.1 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.

None yet

6 participants