]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: suppress the assertion in Watch::notify_ack 51945/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 9 Jun 2023 17:32:27 +0000 (17:32 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 9 Jun 2023 17:32:30 +0000 (17:32 +0000)
Replaced the assert with an error log entry but ultimately
this commit should be reverted.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/watch.cc

index bc8da71c882aed769ab530b1e06e4f65d54148ef..f99b7c726c14a0f6a0655f689b09e0853129da17 100644 (file)
@@ -125,7 +125,12 @@ seastar::future<> Watch::notify_ack(
   logger().debug("{} gid={} cookie={} notify_id={}",
                  __func__,  get_watcher_gid(), get_cookie(), notify_id);
   const auto it = in_progress_notifies.find(notify_id);
-  assert(it != std::end(in_progress_notifies));
+  if (it == std::end(in_progress_notifies)) {
+    logger().error("{} notify_id={} not found on the in-progess list."
+                   " Supressing but this should not happen.",
+                   __func__, notify_id);
+    return seastar::now();
+  }
   auto notify = *it;
   logger().debug("Watch::notify_ack gid={} cookie={} found notify(id={})",
     get_watcher_gid(),