From 12e7dc2f7e36d4b13f4c321047c35f86ee22d281 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 28 Feb 2019 18:44:04 +0800 Subject: [PATCH] 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 --- src/crimson/osd/pg_meta.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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), -- 2.39.5