]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: InternalClientRequests should not be repeated after interval change
authorSamuel Just <sjust@redhat.com>
Tue, 27 Aug 2024 20:11:02 +0000 (20:11 +0000)
committerSamuel Just <sjust@redhat.com>
Tue, 17 Sep 2024 02:53:05 +0000 (19:53 -0700)
Normal cient requests are special in that we "requeue" them after an
interval change if the primary did not change.  This behavior exists due
to a client-side optimization where the client doesn't resend the
operation unless the primary changed.

That's not true for InternalClientRequest (generally used for watch
expirations).  The primary will eventually reload and re-expire the
watch once the other watchers reconnect.

If we actually did want InternalClientRequests to be able to repeat
after interval change, they'd need the same resettable handle mechanism
normal ClientRequests use -- this implementation wouldn't actually work
as it would mean the same handle reentering a previous stage.

Fixes: https://tracker.ceph.com/issues/68068
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/osd_operations/internal_client_request.cc

index 2968a6f4385987ff0fd6e3cd88c06df10aea61d0..a19bb0826f00456932cb6def3167f98aa5a0a31b 100644 (file)
@@ -54,9 +54,9 @@ seastar::future<> InternalClientRequest::start()
 {
   track_event<StartEvent>();
   return crimson::common::handle_system_shutdown([this] {
-    return seastar::repeat([this] {
       LOG_PREFIX(InternalClientRequest::start);
       DEBUGI("{}: in repeat", *this);
+
       return interruptor::with_interruption([this]() mutable {
         return enter_stage<interruptor>(
          client_pp().wait_for_active
@@ -121,17 +121,12 @@ seastar::future<> InternalClientRequest::start()
           PG::load_obc_ertr::all_same_way([] {
             return seastar::now();
           })
-        ).then_interruptible([] {
-          return seastar::stop_iteration::yes;
-        });
-      }, [this](std::exception_ptr eptr) {
-        if (should_abort_request(*this, std::move(eptr))) {
-          return seastar::stop_iteration::yes;
-        } else {
-          return seastar::stop_iteration::no;
-        }
-      }, pg, start_epoch);
-    }).then([this] {
+       );
+      }, [](std::exception_ptr eptr) {
+       return seastar::now();
+      }, pg, start_epoch
+
+    ).then([this] {
       track_event<CompletionEvent>();
     }).handle_exception_type([](std::system_error &error) {
       logger().debug("error {}, message: {}", error.code(), error.what());