]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/btree: fix minor corner case issue 59205/head
authorXuehan Xu <xuxuehan@qianxin.com>
Wed, 14 Aug 2024 03:00:00 +0000 (11:00 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Wed, 14 Aug 2024 03:00:00 +0000 (11:00 +0800)
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/btree/fixed_kv_node.h

index 0bde60ef18ede02ef7fc2677b22044dbd1921b7d..eacf8a8cc4012bd75752acd5220cb77370162883 100644 (file)
@@ -148,7 +148,7 @@ struct FixedKVNode : ChildableCachedExtent {
     ceph_assert(iter != copy_dests_by_trans.end());
     auto &copy_dests = static_cast<copy_dests_t&>(*iter);
     auto it = copy_dests.dests_by_key.lower_bound(key);
-    if ((*it)->range.begin > key) {
+    if (it == copy_dests.dests_by_key.end() || (*it)->range.begin > key) {
       ceph_assert(it != copy_dests.dests_by_key.begin());
       --it;
     }