OPTION(osd_op_queue, OPT_STR, "wpq") // PrioritzedQueue (prio), Weighted Priority Queue (wpq), or debug_random
OPTION(osd_op_queue_cut_off, OPT_STR, "low") // Min priority to go to strict queue. (low, high, debug_random)
+OPTION(osd_ignore_stale_divergent_priors, OPT_BOOL, false) // do not assert on divergent_prior entries which aren't in the log and whose on-disk objects are newer
+
// Set to true for testing. Users should NOT set this.
// If set to true even after reading enough shards to
// decode the object, any error will be reported.
coll_t log_coll, ghobject_t log_oid,
const pg_info_t &info,
ostringstream &oss,
+ bool tolerate_divergent_missing_log,
bool debug_verify_stored_missing = false
) {
return read_log_and_missing(
store, pg_coll, log_coll, log_oid, info,
log, missing, oss,
+ tolerate_divergent_missing_log,
&clear_divergent_priors,
this,
(pg_log_debug ? &log_keys_debug : 0),
const pg_info_t &info,
IndexedLog &log,
missing_type &missing, ostringstream &oss,
+ bool tolerate_divergent_missing_log,
bool *clear_divergent_priors = NULL,
const DoutPrefixProvider *dpp = NULL,
set<string> *log_keys_debug = 0,
* version would not have been recovered, and a newer version
* would show up in the log above.
*/
- assert(oi.version == i->first);
+ /**
+ * Unfortunately the assessment above is incorrect because of
+ * http://tracker.ceph.com/issues/17916 (we were incorrectly
+ * not removing the divergent_priors set from disk state!),
+ * so let's check that.
+ */
+ if (oi.version > i->first && tolerate_divergent_missing_log) {
+ ldpp_dout(dpp, 0) << "read_log divergent_priors entry (" << *i
+ << ") inconsistent with disk state (" << oi
+ << "), assuming it is tracker.ceph.com/issues/17916"
+ << dendl;
+ } else {
+ assert(oi.version == i->first);
+ }
} else {
ldpp_dout(dpp, 15) << "read_log_and_missing missing " << *i << dendl;
missing.add(i->second, i->first, eversion_t());
PGLog::read_log_and_missing(fs, coll,
struct_ver >= 8 ? coll : coll_t::meta(),
struct_ver >= 8 ? pgid.make_pgmeta_oid() : log_oid,
- info, log, missing, oss);
+ info, log, missing, oss,
+ g_ceph_context->_conf->osd_ignore_stale_divergent_priors);
if (debug && oss.str().size())
cerr << oss.str() << std::endl;
}