]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/SnapMapper: Crimson - fix OSDriver::get_next
authorMatan Breizman <mbreizma@redhat.com>
Mon, 12 Feb 2024 09:26:36 +0000 (09:26 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Mon, 12 Feb 2024 10:16:19 +0000 (10:16 +0000)
There are other omap_keys that we may return which are not
SnapMapper entries (_biginfo, _epoch, _fastinfo etc.).

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/osd/SnapMapper.cc

index 40611f7a646a817b609b291d47a3edff79a9076f..8f1be7052693cfeaac3078d3668c0e23fd346000 100644 (file)
@@ -119,7 +119,8 @@ int OSDriver::get_next(
     ch, hoid, key
   ).safe_then_unpack([&key, next] (bool, FuturizedStore::Shard::omap_values_t&& vals) {
     CRIMSON_DEBUG("OSDriver::get_next key {} got omap values", key);
-    if (auto nit = std::begin(vals); nit == std::end(vals)) {
+    if (auto nit = std::begin(vals);
+        nit == std::end(vals) || !SnapMapper::is_mapping(nit->first)) {
       CRIMSON_DEBUG("OSDriver::get_next key {} no more values", key);
       return -ENOENT;
     } else {