dout(10) << "update_from_paxos got " << version << dendl;
mon->monmap->decode(monmap_bl);
- if (mon->store->exists("mkfs", get_service_name())) {
+ if (mon->store->exists("mkfs", "monmap")) {
MonitorDBStore::Transaction t;
- erase_mkfs(&t);
+ t.erase("mkfs", "monmap");
mon->store->apply_transaction(t);
}
}
OSDMap newmap;
bufferlist bl;
+ mon->store->get("mkfs", "osdmap", bl);
- get_mkfs(bl);
if (bl.length()) {
newmap.decode(bl);
newmap.set_fsid(mon->monmap->fsid);
dout(1) << osdmap << dendl;
if (osdmap.epoch == 1) {
- erase_mkfs(&t);
+ t.erase("mkfs", "osdmap");
}
}
if (!t.empty())
last_committed_name("last_committed"),
first_committed_name("first_committed"),
last_accepted_name("last_accepted"),
- mkfs_name("mkfs"),
full_version_name("full"), full_latest_name("latest"),
cached_first_committed(0), cached_last_committed(0)
{
const string last_committed_name;
const string first_committed_name;
const string last_accepted_name;
- const string mkfs_name;
const string full_version_name;
const string full_latest_name;
/**
string key = mon->store->combine_strings(prefix, name);
t->put(get_service_name(), key, bl);
}
- /**
- * Remove our mkfs entry from the store
- *
- * @param t A transaction to which we will add this erase operation
- */
- void erase_mkfs(MonitorDBStore::Transaction *t) {
- t->erase(mkfs_name, get_service_name());
- }
+
/**
* @}
*/
version_t get_value(const string& key) {
return mon->store->get(get_service_name(), key);
}
- /**
- * Get the contents of our mkfs entry
- *
- * @param bl A bufferlist to populate with the contents of the entry
- * @return 0 on success; <0 otherwise
- */
- int get_mkfs(bufferlist& bl) {
- return mon->store->get(mkfs_name, get_service_name(), bl);
- }
-
/**
* @}