]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: skip fast_info if it is not around
authorKefu Chai <kchai@redhat.com>
Thu, 28 Feb 2019 10:44:04 +0000 (18:44 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 20 Mar 2019 06:54:07 +0000 (14:54 +0800)
fast_info is optional. for instance, there is chance that it
is the first time the info is written to store, in that case,
there is no delta, i.e. fast info yet.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/pg_meta.cc

index 2098e50a2e3e65ac799023e90d451aa8722298b3..9861ba6c803cbfff5f9db74437a64288a5bb9686 100644 (file)
@@ -94,8 +94,9 @@ seastar::future<pg_info_t, PastIntervals> PGMeta::load()
       }
       {
         auto fast_info = find_value<pg_fast_info_t>(values, fastinfo_key);
-        assert(fast_info);
-        fast_info->try_apply_to(&info);
+        if (fast_info) {
+          fast_info->try_apply_to(&info);
+        }
       }
       return seastar::make_ready_future<pg_info_t, PastIntervals>(
         std::move(info),