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

Introduce RocksDbSegmentIdentifier to avoid changing the storege plug… #3755

Merged
merged 3 commits into from
May 4, 2022

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Apr 23, 2022

…in interface

Signed-off-by: Fabio Di Fabio fabio.difabio@consensys.net

PR description

A refactor of #3734 to avoid changing the storage plugin interface

Fixed Issue(s)

fixes #3722

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

@fab-10 fab-10 requested a review from garyschulte April 23, 2022 15:40
Copy link
Contributor

@garyschulte garyschulte left a comment

Choose a reason for hiding this comment

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

Love it. Feedback on naming, but nothing blocking

import org.rocksdb.RocksDBException;
import org.rocksdb.TransactionDB;

public class RocksDbSegmentIdentifier {
Copy link
Contributor

Choose a reason for hiding this comment

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

how about RocksDbColumnFamilyIdentifier instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Used SegmentedIdentifier to follow the naming used in the interface, but I do not have a strong opinion on this, so if you think RocksDbColumnFamilyIdentifier is fits better, I can rename it

this.reference = new AtomicReference<>(columnFamilyHandle);
}

public void recreate() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think recreate implies storage is reclaimed. how about reset or clear?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reset sound good

…in interface

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Copy link
Contributor

@matkt matkt left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarcloud
Copy link

sonarcloud bot commented May 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

83.3% 83.3% Coverage
0.0% 0.0% Duplication

@garyschulte garyschulte merged commit 0fdd55d into hyperledger:main May 4, 2022
lucassaldanha pushed a commit to lucassaldanha/besu that referenced this pull request May 4, 2022
hyperledger#3755)

* Introduce RocksDbSegmentIdentifier to avoid changing the storege plugin interface

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
lucassaldanha added a commit that referenced this pull request May 4, 2022
* fix nullpointer on snapsync (#3773)
* Introduce RocksDbSegmentIdentifier to avoid changing the storege plug… (#3755)
* Release 22.4.0

Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>

Co-authored-by: matkt <karim.t2am@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 added the mainnet label Jun 28, 2022
@fab-10 fab-10 deleted the bugfix-3722 branch November 8, 2022 13:28
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
hyperledger#3755)

* Introduce RocksDbSegmentIdentifier to avoid changing the storege plugin interface

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
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.

Segfault on latest besu, org.rocksdb.WriteOptions
3 participants