From: Yehuda Sadeh Date: Wed, 8 May 2013 19:18:49 +0000 (-0700) Subject: osd: don't assert if get_omap_iterator() returns NULL X-Git-Tag: v0.67-rc1~128^2~139 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=546ed917fb3e76fef090492f3b8c322897aa4ed9;p=ceph.git osd: don't assert if get_omap_iterator() returns NULL Fixes: #4949 This can happen if the object does not exist and it's a write operation. Just return -ENOENT. Signed-off-by: Yehuda Sadeh --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 85b62662ac93..4e396c324f7c 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -2922,7 +2922,10 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector& ops) ObjectMap::ObjectMapIterator iter = osd->store->get_omap_iterator( coll, soid ); - assert(iter); + if (!iter) { + result = -ENOENT; + goto fail; + } iter->upper_bound(start_after); if (filter_prefix >= start_after) iter->lower_bound(filter_prefix); for (uint64_t i = 0;