From: Radosław Zarzyński Date: Wed, 27 Apr 2022 11:04:37 +0000 (+0200) Subject: crimson/osd: drop blocking_future from OSDMapGate X-Git-Tag: v18.0.0~947^2~6 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f693fabfe8275fa698557b0c9e30883c203d10fe;p=ceph.git crimson/osd: drop blocking_future from OSDMapGate Signed-off-by: Radosław Zarzyński --- diff --git a/src/crimson/osd/osdmap_gate.cc b/src/crimson/osd/osdmap_gate.cc index 316596ab185df..be0f1c08dde1a 100644 --- a/src/crimson/osd/osdmap_gate.cc +++ b/src/crimson/osd/osdmap_gate.cc @@ -22,32 +22,6 @@ void OSDMapGate::OSDMapBlocker::dump_detail(Formatter *f) const f->close_section(); } -template -blocking_future OSDMapGate::wait_for_map(epoch_t epoch) -{ - if (__builtin_expect(stopping, false)) { - return make_exception_blocking_future( - crimson::common::system_shutdown_exception()); - } - if (current >= epoch) { - return make_ready_blocking_future(current); - } else { - logger().info("evt epoch is {}, i have {}, will wait", epoch, current); - auto &blocker = waiting_peering.emplace( - epoch, std::make_pair(blocker_type, epoch)).first->second; - auto fut = blocker.promise.get_shared_future(); - if (shard_services) { - return blocker.make_blocking_future( - (*shard_services).get().osdmap_subscribe(current, true).then( - [fut=std::move(fut)]() mutable { - return std::move(fut); - })); - } else { - return blocker.make_blocking_future(std::move(fut)); - } - } -} - template seastar::future OSDMapGate::wait_for_map( typename OSDMapBlocker::BlockingEvent::TriggerI&& trigger, diff --git a/src/crimson/osd/osdmap_gate.h b/src/crimson/osd/osdmap_gate.h index f378b28825aae..2604598d05b10 100644 --- a/src/crimson/osd/osdmap_gate.h +++ b/src/crimson/osd/osdmap_gate.h @@ -64,8 +64,6 @@ public: : blocker_type(blocker_type), shard_services(shard_services) {} // wait for an osdmap whose epoch is greater or equal to given epoch - blocking_future - wait_for_map(epoch_t epoch); // TODO: define me! seastar::future wait_for_map(typename OSDMapBlocker::BlockingEvent::TriggerI&& trigger,