return new CephRocksdbLogger(g_ceph_context);
}
-int string2bool(string val, bool &b_val)
+static int string2bool(const string &val, bool &b_val)
{
if (strcasecmp(val.c_str(), "false") == 0) {
b_val = false;
}
}
-int RocksDBStore::tryInterpret(const string key, const string val, rocksdb::Options &opt)
+int RocksDBStore::tryInterpret(const string &key, const string &val, rocksdb::Options &opt)
{
if (key == "compaction_threads") {
std::string err;
return 0;
}
-int RocksDBStore::ParseOptionsFromString(const string opt_str, rocksdb::Options &opt)
+int RocksDBStore::ParseOptionsFromString(const string &opt_str, rocksdb::Options &opt)
{
map<string, string> str_map;
int r = get_str_map(opt_str, &str_map, ",\n;");
bool enable_rmrange;
void compact() override;
- int tryInterpret(const string key, const string val, rocksdb::Options &opt);
- int ParseOptionsFromString(const string opt_str, rocksdb::Options &opt);
+ int tryInterpret(const string& key, const string& val, rocksdb::Options &opt);
+ int ParseOptionsFromString(const string& opt_str, rocksdb::Options &opt);
static int _test_init(const string& dir);
int init(string options_str) override;
/// compact rocksdb for all keys with a given prefix