From dc85daff1bb4e75030a484380cc4cbdb8cf86dc1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 24 Nov 2008 10:17:58 -0800 Subject: [PATCH] osd: remove bad assertion in pick_read_snap The clone oid.snap does not necessary correspond to the newest snap, since snaps may be deleted, or because the snap the snap is named based on the snap context seq and not the oldest snap it contains. --- src/osd/ReplicatedPG.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 4c2b768054ce9..814461ef58352 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -617,14 +617,13 @@ bool ReplicatedPG::pick_read_snap(pobject_t& poid) dout(20) << "pick_read_snap " << poid << " snaps " << snaps << dendl; snapid_t first = snaps[snaps.size()-1]; snapid_t last = snaps[0]; - assert(last == poid.oid.snap); if (first <= want) { dout(20) << "pick_read_snap " << poid << " [" << first << "," << last << "] contains " << want << " -- HIT" << dendl; return true; + } else { + dout(20) << "pick_read_snap " << poid << " [" << first << "," << last << "] does not contain " << want << " -- DNE" << dendl; + return false; } - - dout(20) << "pick_read_snap " << poid << " [" << first << "," << last << "] does not contain " << want << " -- DNE" << dendl; - return false; } -- 2.39.5