Skip to content

Commit

Permalink
crimson/osd: skip fast_info if it is not around
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tchaikov committed Mar 20, 2019
1 parent 3abaa88 commit 12e7dc2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/crimson/osd/pg_meta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 12e7dc2

Please sign in to comment.