mysql-5.6 icon indicating copy to clipboard operation
mysql-5.6 copied to clipboard

Support for building RocksDB plugins and custom file systems

Open yhr opened this issue 4 years ago • 2 comments

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.

yhr avatar Feb 18 '21 09:02 yhr

@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!

yhr avatar Feb 18 '21 09:02 yhr

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

yhr avatar Mar 02 '21 12:03 yhr