if (t == NULL)
t = new MonitorDBStore::Transaction;
- // write out the full map for all past epochs
+ // Write out the full map for all past epochs. Encode the full
+ // map with the same features as the incremental. If we don't
+ // know, use the quorum features. If we don't know those either,
+ // encode with all features.
+ uint64_t f = inc.encode_features;
+ if (!f)
+ f = mon->quorum_features;
+ if (!f)
+ f = -1;
bufferlist full_bl;
- osdmap.encode(full_bl, inc.encode_features);
+ osdmap.encode(full_bl, f);
tx_size += full_bl.length();
put_version_full(t, osdmap.epoch, full_bl);