crimson/osd: introduce more asserts to the Watch timeout handling.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This commit is contained in:
Radoslaw Zarzynski 2021-06-21 12:28:52 +00:00
parent a5fd875665
commit c862be649a
3 changed files with 3 additions and 0 deletions

View File

@ -181,6 +181,7 @@ OpsExecuter::watch_ierrorator::future<> OpsExecuter::do_op_watch_subop_watch(
return seastar::now();
},
[] (auto&& ctx, ObjectContextRef obc, Ref<PG> pg) {
assert(pg);
auto [it, emplaced] = obc->watchers.try_emplace(ctx.key, nullptr);
if (emplaced) {
const auto& [cookie, entity] = ctx.key;

View File

@ -182,6 +182,7 @@ void Watch::cancel_notify(const uint64_t notify_id)
void Watch::do_watch_timeout(Ref<PG> pg)
{
assert(pg);
auto [op, fut] = pg->get_shard_services().start_operation<WatchTimeoutRequest>(
shared_from_this(), pg);
std::ignore = std::move(fut).then([op=std::move(op), this] {

View File

@ -61,6 +61,7 @@ public:
winfo(winfo),
entity_name(entity_name),
timeout_timer([this, pg=std::move(pg)] {
assert(pg);
return do_watch_timeout(pg);
}) {
}