mysql-5.6
mysql-5.6 copied to clipboard
Support for building RocksDB plugins and custom file systems
RocksDB now supports building plugins from external repos (https://github.com/facebook/rocksdb/pull/7918) and this pull request adds the needed cmake magic to include these in myrocks builds. The plugins to include are specified by ROCKSDB_PLUGINS:
git clone https://github.com/ajkr/dedupfs rocksdb/plugin/dedupfs
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=system -DWITH_ZLIB=bundled\
DMYSQL_MAINTAINER_MODE=0 -DENABLED_LOCAL_INFILE=1 -DCMAKE_CXX_FLAGS="-march=native" \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DROCKSDB_PLUGINS=dedupfs
Note: as this branch is not yet including the above pull request, the plugin directory does not exist, but can be created manually and the above example will work.
A configuration parameter, rocksdb_fs_uri is also added to allow the user to specify custom file systems.
rocksdb_fs_uri=dedupfs
These two changes allows external file systems to be included and used in myrocks. I've tested using dedupfs and a custom filesystem that i've developed for zoned block devices: zenfs.
@yizhang82 : could you have a look at this? Andrew Kryczka mentioned that you have been part of the plugin discussions. I've also submitted a PR for 5.6, see https://github.com/facebook/mysql-5.6/pull/1159 Cheers!
Pushed a small update, aligning with the rocksdb makefile build: allowing plugin makefile to be called anything, as long as it has the extension .mk