diff options
author | Sage Weil <sage@newdream.net> | 2017-04-21 15:37:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-21 15:37:18 +0200 |
commit | 4c1d59c549cc7d34cc808c28344ae62dfc0ccc2a (patch) | |
tree | 30780f1a7ac8084788fd77d03e037bcc0e212741 /src/osd | |
parent | Merge pull request #13978 from trociny/wip-18787 (diff) | |
parent | osd: pglog: with config, don't assert in the presence of stale divergent_priors (diff) | |
download | ceph-4c1d59c549cc7d34cc808c28344ae62dfc0ccc2a.tar.xz ceph-4c1d59c549cc7d34cc808c28344ae62dfc0ccc2a.zip |
Merge pull request #14648 from gregsfortytwo/wip-17916-master
osd: pglog: with config, don't assert in the presence of stale diverg…
Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'src/osd')
-rw-r--r-- | src/osd/PG.cc | 1 | ||||
-rw-r--r-- | src/osd/PGLog.h | 18 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index aabb1290a72..f8c14131f6d 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -3289,6 +3289,7 @@ void PG::read_state(ObjectStore *store, bufferlist &bl) ghobject_t(info_struct_v < 8 ? OSD::make_pg_log_oid(pg_id) : pgmeta_oid), info, oss, + cct->_conf->osd_ignore_stale_divergent_priors, cct->_conf->osd_debug_verify_missing_on_start); if (oss.tellp()) osd->clog->error() << oss.rdbuf(); diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index 5096e203179..e4d0fa304ab 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -1098,11 +1098,13 @@ public: 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), @@ -1115,6 +1117,7 @@ public: 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, @@ -1290,7 +1293,20 @@ public: * 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()); |