DbLedgerStorage -- Main implementation#855
Closed
merlimat wants to merge 2 commits into
Closed
Conversation
eolivelli
requested changes
Dec 14, 2017
Contributor
eolivelli
left a comment
There was a problem hiding this comment.
Great feature!
I left some minor comments/questions
|
|
||
| cleanupExecutor.execute(() -> { | ||
| try { | ||
| if (log.isDebugEnabled()) { |
Contributor
There was a problem hiding this comment.
This operation is out of any lock, if it takes very long time would it be possible to have concurrent clean ups running? Is this a problem?
Contributor
Author
There was a problem hiding this comment.
It is not a problem because the cleanupExecutor is single threaded, so there will just be 1 cleanup happening at a given time.
Contributor
Author
There was a problem hiding this comment.
I'll add a comment to clarify that in the code
| System.out.println("newEntry3: " + ByteBufUtil.hexDump(newEntry3)); | ||
| assertEquals(newEntry3, res); | ||
|
|
||
| storage.shutdown(); |
Contributor
There was a problem hiding this comment.
What about closing storage in teardown() ?
| conf.setLedgerDirNames(new String[] { tmpDir.toString() }); | ||
| Bookie bookie = new Bookie(conf); | ||
|
|
||
| storage = (DbLedgerStorage) bookie.getLedgerStorage(); |
Contributor
Author
There was a problem hiding this comment.
Added shutdown in teardown method.
9ef0ec4 to
4f446e3
Compare
Member
|
@eolivelli can you review this pull request again? |
sijie
approved these changes
Dec 15, 2017
ArvinDevel
pushed a commit
to ArvinDevel/bookkeeper
that referenced
this pull request
Dec 19, 2017
`LedgerStorage` implementation that uses the EntryLogger mechanism but stores the indexes in a RocksDB database. In addition, there are also a WriteCache and a ReadCache that are used to completely decouple the read & write paths. Author: Matteo Merli <mmerli@apache.org> Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Sijie Guo <sijie@apache.org> This closes apache#855 from merlimat/db-ledger-storage-impl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LedgerStorageimplementation that uses the EntryLogger mechanism but stores the indexes in a RocksDB database.In addition, there are also a WriteCache and a ReadCache that are used to completely decouple the read & write paths.