]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: introduce more asserts to the Watch timeout handling. 41962/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 21 Jun 2021 12:28:52 +0000 (12:28 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 21 Jun 2021 23:58:36 +0000 (23:58 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/ops_executer.cc
src/crimson/osd/watch.cc
src/crimson/osd/watch.h

index 98f62b337d3408a374fa932d393490b89da89615..4bc876c00baa38fd63bb12c692f7043701884a10 100644 (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;
index 5657a8aeae215af3925c8d64e4f7cdfe83c9f0b9..1848869d19b74de42d6ffedaba4fd15cc5171a57 100644 (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] {
index 24d4d315accca92ab306c271925ba4af95b83d36..f32904cb1ffc72b2ac33bbc1c7f7d62e1cd77c57 100644 (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);
       }) {
   }