]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg_recovery: fix exception handler scope in recover_missing 69964/head
authorSun Yuechi <sunyuechi@iscas.ac.cn>
Mon, 6 Jul 2026 14:44:35 +0000 (22:44 +0800)
committerSun Yuechi <sunyuechi@iscas.ac.cn>
Mon, 6 Jul 2026 14:44:35 +0000 (22:44 +0800)
Member access binds tighter than ?:, so the handler attached only to the
recover_object() branch and exceptions from recover_object_with_throttle()
escaped unhandled. Parenthesize the ternary to cover both branches.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
src/crimson/osd/pg_recovery.cc

index 7b252e212cfbc2720746a29385a81bf233e39d4f..8181a0d6f8955d35f5617cdd79330e361e58602f 100644 (file)
@@ -319,10 +319,10 @@ PGRecovery::recover_missing(
     } else {
       return recovering.wait_track_blocking(
        trigger,
-       with_throttle
+       (with_throttle
          ? recover_object_with_throttle(soid, need)
          : recover_object(soid, need)
-       .handle_exception_interruptible(
+       ).handle_exception_interruptible(
          [=, this, soid = std::move(soid)] (auto e) {
          on_failed_recover({ pg->get_pg_whoami() }, soid, need);
          return seastar::make_ready_future<>();