Skip to content

Commit

Permalink
Merge pull request #11354 from liewegas/wip-rocksdb
Browse files Browse the repository at this point in the history
rocksdb: update to latest, and make it the default for the mons
  • Loading branch information
liewegas committed Oct 19, 2016
2 parents d30ee64 + 42a6b0e commit 0aeea89
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions PendingReleaseNotes
Expand Up @@ -35,6 +35,15 @@
1
}.

* If your monitors are configured to use the experimental rocksdb
backend, you may need to manually adjust the store before upgraded.
Monitors now explicitly record what keyvalue backend type they use. If
the kv_backend file is missing from the mon_data directory (normally
/var/lib/ceph/mon/$cluster-$name/kv_backend) it is now assumed to be leveldb.
If you had manually configured the mon to use rocksdb, this file should
be created and filled with the string "rocksdb" (newline optional).


11.0.0
------

Expand Down
2 changes: 1 addition & 1 deletion src/common/config_opts.h
Expand Up @@ -337,7 +337,7 @@ OPTION(mon_inject_transaction_delay_probability, OPT_DOUBLE, 0) // range [0, 1]
OPTION(mon_sync_provider_kill_at, OPT_INT, 0) // kill the sync provider at a specific point in the work flow
OPTION(mon_sync_requester_kill_at, OPT_INT, 0) // kill the sync requester at a specific point in the work flow
OPTION(mon_force_quorum_join, OPT_BOOL, false) // force monitor to join quorum even if it has been previously removed from the map
OPTION(mon_keyvaluedb, OPT_STR, "leveldb") // type of keyvaluedb backend
OPTION(mon_keyvaluedb, OPT_STR, "rocksdb") // type of keyvaluedb backend

// UNSAFE -- TESTING ONLY! Allows addition of a cache tier with preexisting snaps
OPTION(mon_debug_unsafe_allow_tier_with_nonempty_snaps, OPT_BOOL, false)
Expand Down
3 changes: 1 addition & 2 deletions src/kv/KeyValueDB.cc
Expand Up @@ -25,8 +25,7 @@ KeyValueDB *KeyValueDB::create(CephContext *cct, const string& type,
}
#endif
#ifdef HAVE_LIBROCKSDB
if (type == "rocksdb" &&
cct->check_experimental_feature_enabled("rocksdb")) {
if (type == "rocksdb") {
return new RocksDBStore(cct, dir, p);
}
#endif
Expand Down
3 changes: 2 additions & 1 deletion src/mon/MonitorDBStore.h
Expand Up @@ -644,7 +644,8 @@ class MonitorDBStore
string kv_type;
int r = read_meta("kv_backend", &kv_type);
if (r < 0) {
kv_type = g_conf->mon_keyvaluedb;
// assume old monitors that did not mark the type were leveldb.
kv_type = "leveldb";
r = write_meta("kv_backend", kv_type);
if (r < 0)
return r;
Expand Down
2 changes: 1 addition & 1 deletion src/rocksdb
Submodule rocksdb updated 244 files

0 comments on commit 0aeea89

Please sign in to comment.