Conversation
|
do we need to use submodule? |
|
No, use subtree is OK. When using submodule, more than 50 Mib data needs to be downloaded. However, when using subtree, less than 6 Mib data is required. |
|
Do we have a better way to update RocksDB from our forked repository later? |
|
Ping, do you have any concern about it? |
|
@BusyJay Can you give an explanation how to use it? |
|
can we prune the RocksDB source, E.g, only keep the source file and build scripts. |
|
PTAL |
|
LGTM |
|
|
||
| [dependencies.lz4-sys] | ||
| git = "https://github.com/busyjay/lz4-rs.git" | ||
| branch = "adjust-build" |
There was a problem hiding this comment.
What does this branch mean?
zhangjinpeng87
left a comment
There was a problem hiding this comment.
LGTM
@huachaohuang PTAL
librocksdb_sys/src/lib.rs
Outdated
There was a problem hiding this comment.
bzip2 is compiled with stdio disabled, so there has to be an external hook to handle error, which is defined in bzip2_sys already.
tests/test_iterator.rs
Outdated
There was a problem hiding this comment.
Because when iterator is not valid anymore, prev should not be called, otherwise assertion in prev will fail.
|
Windows support is not complete yet, there are still some issues on windows platform. But I think it's fine to merge it first, and deal with the issues later. |
This pr changes the way compiling and linking to rocksdb.
In the past, rocksdb is linked dynamically by default. When link to rocksdb statically, shell script is used to download and build all the native libraries. This method is straightforward and worked quite well.
However, things change now. There are several patches and bug fixes that are not merged into upstream yet (and some are probably not merged at all), if we are stick to the old way, there will be conflict between our fork and official release.
Besides, dynamic link is hard to use and maintain. Many issues in TiKV are related to linking to rocksdb dynamically. And shell script is not platform-independent.
So this pr makes rocksdb as a subtree of the project, so that it doesn't have to be downloaded again and again very time clean is run. And then use cmake to skip the details of compilation. Dynamic link is disabled now, only the subtree version of rocksdb is supported.