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

Use reference counting in RocksDB metadata store #13309

Merged
merged 3 commits into from
Dec 15, 2021

Conversation

merlimat
Copy link
Contributor

@merlimat merlimat commented Dec 15, 2021

Motivation

RocksDB based implementation of MetadataStore right now can only be opened once, since it requires a single writer and it enforces it through a file lock.

To make it easier to configure different components which may be creating their own instances of MetadataStore, we should make RocksDbMetadataStore to work consistently as the other implementations, by using a static map of instances and reference counting to decide when it can really get closed.

@Jason918 @shoothzj PTAL

@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Dec 15, 2021
@merlimat merlimat added this to the 2.10.0 milestone Dec 15, 2021
@merlimat merlimat self-assigned this Dec 15, 2021
@github-actions
Copy link

@merlimat:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@merlimat merlimat added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Dec 15, 2021
Copy link
Contributor

@Jason918 Jason918 left a comment

Choose a reason for hiding this comment

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

LGTM

@apache apache deleted a comment from github-actions bot Dec 15, 2021
@codelipenghui codelipenghui merged commit 8075dbd into apache:master Dec 15, 2021
@merlimat merlimat deleted the rocksdb-share branch December 15, 2021 16:40
fxbing pushed a commit to fxbing/pulsar that referenced this pull request Dec 19, 2021
### Motivation

RocksDB based implementation of MetadataStore right now can only be opened once, since it requires a single writer and it enforces it through a file lock. 

To make it easier to configure different components which may be creating their own instances of MetadataStore, we should make `RocksDbMetadataStore` to work consistently as the other implementations, by using a static map of instances and reference counting to decide when it can really get closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet

4 participants