use grocksdb to support latest version of rocksdb#42
use grocksdb to support latest version of rocksdb#42thanethomson merged 11 commits intocometbft:mainfrom
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. |
Looks like that was added on |
alexanderbez
left a comment
There was a problem hiding this comment.
utACK. Let's get this merged and released ASAP :)
tools/Dockerfile
Outdated
| 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.
There was a problem hiding this comment.
linxGnu/grocksdb#111
Need a few tweaks to build with v8.0
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] <support@github.com> 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? |
| 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.
What does this grocksdb_clean_link tag do?
There was a problem hiding this comment.
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. |
thanethomson
left a comment
There was a problem hiding this comment.
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. |
thanethomson
left a comment
There was a problem hiding this comment.
Awesome, thank you @yihuang!
Closes: #43 #44
also add API
NewRocksDBWithRawDBto support read-only open mode and customize options.The impact on existing user is it requires to build with rocksdb
v7.10.2now, otherwise, it behaves the same as before.