]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: simplify SnapTrimObjSubEvent::start()
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 13 Dec 2022 13:28:43 +0000 (13:28 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 28 Feb 2023 16:22:05 +0000 (16:22 +0000)
Throwing away the NOP-looking-like `maybe_delay` concept became
possible after eradication of the `with_interruption` call nested
within `SnapTrimSubEvent`. Before, on Ubuntu and GCC 11.2.1, lack
of it was the reson behind assertion failures on resetting the
`thread_local` intteruption condition.

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

index 1e7dcda761afe1ee115aa0d0c976491b8b711045..73d02d9840801b3fc111a3cbc1e35495bcf13981 100644 (file)
@@ -199,16 +199,9 @@ SnapTrimObjSubEvent::remove_or_update_iertr::future<>
 SnapTrimObjSubEvent::start()
 {
   logger().debug("{}: start", *this);
-
-  IRef ref = this;
-  auto maybe_delay = seastar::now();
-  if (auto delay = 0; delay) {
-    maybe_delay = seastar::sleep(
-      std::chrono::milliseconds(std::lround(delay * 1000)));
-  }
-  return maybe_delay.then([this] {
-    return with_pg(pg->get_shard_services(), pg);
-  }).finally([ref=std::move(ref), this] {
+  return with_pg(
+    pg->get_shard_services(), pg
+  ).finally([ref=IRef{this}, this] {
     logger().debug("{}: complete", *ref);
     return handle.complete();
   });