-
Notifications
You must be signed in to change notification settings - Fork 51
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 grocksdb to support latest version of rocksdb #42
Conversation
also add API `NewRocksDBWithRawDB` to support read-only open mode and customize options
@yihuang, could you please provide a more detailed explanation (ideally in an issue) as to why this change is necessary? Also, it appears as though the tests in CI are failing. |
done, added issue #43 and #44 which are fixed by this PR at once. The ci failure is due to rocksdb version, I updated the version number in the docker file, not sure if that'll update the image automatically. |
we already used on production, so far so good, the only thing different is the building dependency change, no side-effect observed in runtime, other than the changes caused by our tuning of rocksdb options. |
Re: the CI failure for the "Docker testing image" workflow -- Not sure what the fix is, but I managed to repro the same problem in a separate PR (#45). Is it possible that the DockerHub secrets are not propagated into forks (such as this) of this repo and that is causing the failure? @thanethomson FYI have installed fresh new access tokens ( |
@yihuang please address the failing test. This failure is independent of the Docker build failure (we're investigating what's causing that). |
I think it's just due to incompatible rocksdb dependency, which can be fixed by updating the image with newer rocksdb library.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tecbot/gorocksdb is outdated, and missing a maintainer.
linxGnu/grocksdb
is definitely a way to go.
- pending test fixes
Looks like that was added on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK. Let's get this merged and released ASAP :)
tools/Dockerfile
Outdated
@@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |||
|
|||
FROM build AS install | |||
ARG LEVELDB=1.20 | |||
ARG ROCKSDB=6.24.2 | |||
ARG ROCKSDB=7.9.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest version is now v8 BTW
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linxGnu/grocksdb#111
Need a few tweaks to build with v8.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you rock!
I guess become the CI image not updated? |
@yihuang we updated the CI to now use a Docker image built from the current branch (as opposed to one previously built from Docker Hub) and it still seems as though the test is failing. |
…etbft#47) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.4.1 to 2.5.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](docker/setup-buildx-action@v2.4.1...v2.5.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #42 +/- ##
==========================================
+ Coverage 68.58% 68.59% +0.01%
==========================================
Files 27 27
Lines 2123 2124 +1
==========================================
+ Hits 1456 1457 +1
Misses 592 592
Partials 75 75
|
CI passed now. |
How do folks using rocksdb with the current cometbft-db release upgrade? |
@@ -43,7 +43,7 @@ test-badgerdb: | |||
|
|||
test-all: | |||
@echo "--> Running go test" | |||
@go test $(PACKAGES) -tags cleveldb,boltdb,rocksdb,badgerdb -v | |||
@go test $(PACKAGES) -tags cleveldb,boltdb,rocksdb,grocksdb_clean_link,badgerdb -v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this grocksdb_clean_link
tag do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's to control the link flags, the default one is suitable for static linking which specifies all indirect dependencies explicitly, the clean version is suitable for dynamic linking case which only specify "-lrocksdb" and a few system dependencies
Does this fix the rocksdb usage with Cosmos SDK 0.46 or 0.47? |
Apparently simply upgrading should be fine. According to
|
In our experience, upgrading rocksdb library is totally backward compatible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our experience, upgrading rocksdb library is totally backward compatible.
Excellent. If that's the case, please add a changelog entry under the "Dependencies" section (as per https://github.com/cometbft/cometbft/blob/main/CONTRIBUTING.md#changelog) and then we can merge and ship this in a non-breaking release.
sorry for the delay, just added changelog. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you @yihuang!
Closes: #43 #44
also add API
NewRocksDBWithRawDB
to support read-only open mode and customize options.The impact on existing user is it requires to build with rocksdb
v7.10.2
now, otherwise, it behaves the same as before.