monc<->mon lossy, client/server
client<->mds lossless, client/server
+- mon: revisit session trim logic... s->until == utime_t()? :/
+
pending wire, disk format changes
- add fsid to MMonSubscribeAck
}
// monmap?
- bufferlist mapbl;
- store.get_bl_ss(mapbl, "monmap/latest", 0);
- if (mapbl.length() == 0) {
- cerr << "mon fs missing 'monmap'" << std::endl;
- exit(1);
- }
MonMap monmap;
- monmap.decode(mapbl);
+ {
+ bufferlist latest;
+ store.get_bl_ss(latest, "monmap/latest", 0);
+ if (latest.length() == 0) {
+ cerr << "mon fs missing 'monmap'" << std::endl;
+ exit(1);
+ }
+ bufferlist::iterator p = latest.begin();
+ version_t v;
+ ::decode(v, p);
+ bufferlist mapbl;
+ ::decode(mapbl, p);
+ monmap.decode(mapbl);
+ assert(v == monmap.get_epoch());
+ }
if ((unsigned)whoami >= monmap.size() || whoami < 0) {
cerr << "mon" << whoami << " does not exist in monmap" << std::endl;
bufferlist monmapbl;
monmap->encode(monmapbl);
store->put_bl_sn(monmapbl, "monmap", monmap->epoch);
- store->put_bl_ss(monmapbl, "monmap", "latest");
+
+ // latest, too.. but make this conform to paxos stash latest format
+ bufferlist latest;
+ version_t v = monmap->get_epoch();
+ ::encode(v, latest);
+ ::encode(monmapbl, latest);
+ store->put_bl_ss(latest, "monmap", "latest");
for (vector<PaxosService*>::iterator p = paxos_service.begin(); p != paxos_service.end(); p++) {
PaxosService *svc = *p;