OPTION(kinetic_use_ssl, OPT_BOOL, false) // whether to secure kinetic traffic with TLS
+OPTION(rocksdb_separate_wal_dir, OPT_BOOL, false) // use $path.wal for wal
OPTION(rocksdb_log_to_ceph_log, OPT_BOOL, true) // log to ceph log
// rocksdb options that will be used for keyvaluestore(if backend is rocksdb)
OPTION(keyvaluestore_rocksdb_options, OPT_STR, "")
return r;
}
}
-
- // create tertiary paths
- string wal_path = path + ".wal";
- struct stat st;
- int r = ::stat(wal_path.c_str(), &st);
- if (r < 0)
- r = -errno;
- if (r == -ENOENT) {
- unsigned slashoff = path.rfind('/');
- string target = path.substr(slashoff + 1);
- r = ::symlink(target.c_str(), wal_path.c_str());
- if (r < 0) {
- out << "failed to symlink " << wal_path << " to " << target;
- return -errno;
- }
- }
return do_open(out, true);
}
return -EINVAL;
}
opt.create_if_missing = create_if_missing;
- opt.wal_dir = path + ".wal";
+ if (g_conf->rocksdb_separate_wal_dir) {
+ opt.wal_dir = path + ".wal";
+ }
if (g_conf->rocksdb_log_to_ceph_log) {
opt.info_log.reset(new CephRocksdbLogger(g_ceph_context));