]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PG: ignore purged_snaps inconsistencies for now
authorSage Weil <sage@redhat.com>
Sat, 2 Dec 2017 16:40:20 +0000 (10:40 -0600)
committerSage Weil <sage@redhat.com>
Sun, 3 Dec 2017 17:36:27 +0000 (11:36 -0600)
These are possible because we update purged_snaps, part of the pg_info_t,
but we do not bump the pg version or match it with a log entry, which
means that the change does not reliably propagate to new OSDs during
peering etc.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index a2cfc99cecdf88e9460c24305b9d1893432eea0f..dd791e5b3af4c35469fa9acbf15c29d7113679ec 100644 (file)
@@ -7360,7 +7360,18 @@ boost::statechart::result PG::RecoveryState::Active::react(const AdvMap& advmap)
          lderr(pg->cct) << __func__ << " purged_snaps does not contain "
                         << rm << ", only " << overlap << dendl;
          pg->info.purged_snaps.subtract(overlap);
-         bad = true;
+         // This can currently happen in the normal (if unlikely) course of
+         // events.  Because adding snaps to purged_snaps does not increase
+         // the pg version or add a pg log entry, we don't reliably propagate
+         // purged_snaps additions to other OSDs.
+         // One example:
+         //  - purge S
+         //  - primary and replicas update purged_snaps
+         //  - no object updates
+         //  - pg mapping changes, new primary on different node
+         //  - new primary pg version == eversion_t(), so info is not
+         //    propagated.
+         //bad = true;
        } else {
          pg->info.purged_snaps.erase(k.first, k.second);
        }