From: Kefu Chai Date: Thu, 28 Feb 2019 10:44:04 +0000 (+0800) Subject: crimson/osd: skip fast_info if it is not around X-Git-Tag: v15.0.0~187^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=12e7dc2f7e36d4b13f4c321047c35f86ee22d281;p=ceph-ci.git crimson/osd: skip fast_info if it is not around 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 --- diff --git a/src/crimson/osd/pg_meta.cc b/src/crimson/osd/pg_meta.cc index 2098e50a2e3..9861ba6c803 100644 --- a/src/crimson/osd/pg_meta.cc +++ b/src/crimson/osd/pg_meta.cc @@ -94,8 +94,9 @@ seastar::future PGMeta::load() } { auto fast_info = find_value(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( std::move(info),