]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: fix wrong-positioned asserts 57288/head
authorXuehan Xu <xuxuehan@qianxin.com>
Thu, 22 Feb 2024 09:03:43 +0000 (17:03 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Mon, 6 May 2024 12:45:56 +0000 (15:45 +0300)
Fixes: https://tracker.ceph.com/issues/64535
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
(cherry picked from commit b469cbb507675108cecfcfd9da3bd5144deabcf9)

src/crimson/os/seastore/seastore.cc

index eba19eabebebdea4ea162b3251c3523e9a322d36..85a680b2ee2f27910233ce6b995c3402bbfccfae 100644 (file)
@@ -725,12 +725,12 @@ SeaStore::Shard::list_objects(CollectionRef ch,
                  LOG_PREFIX(SeaStore::list_objects);
                  DEBUGT("got {} objects, left limit {}",
                    t, next_objects.size(), limit);
-                 if (last && std::get<1>(ret) == pend) {
-                   std::get<1>(ret) = end;
-                 }
                  assert(limit == 0 ||
                         std::get<1>(ret) == pend ||
                         std::get<1>(ret) == ghobject_t::get_max());
+                 if (last && std::get<1>(ret) == pend) {
+                   std::get<1>(ret) = end;
+                 }
                  return list_iertr::make_ready_future<
                    seastar::stop_iteration
                    >(seastar::stop_iteration::no);