]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: use finally for capturing this
authorKefu Chai <kchai@redhat.com>
Sun, 28 Feb 2021 05:20:41 +0000 (13:20 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 28 Feb 2021 06:06:05 +0000 (14:06 +0800)
* no need to capture this, it is already enclosed by `ref`
* use finally for capturing `ref`, and for printing out the "complete"
  logging message. we could use a different branch for printing out
  the failure message if any.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/osd_operations/peering_event.cc

index 2372adb328eb0a8116cd7718c721d7f72b063915..aa3fdec2155c21229475e22650207a8dbc885ce0 100644 (file)
@@ -90,8 +90,8 @@ seastar::future<> PeeringEvent::start()
     }
   }).then([this] {
     return shard_services.send_pg_temp();
-  }).then([this, ref=std::move(ref)] {
-    logger().debug("{}: complete", *this);
+  }).finally([ref=std::move(ref)] {
+    logger().debug("{}: complete", *ref);
   });
 }