]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: drop blocking_future from OSDMapGate
authorRadosław Zarzyński <rzarzyns@redhat.com>
Wed, 27 Apr 2022 11:04:37 +0000 (13:04 +0200)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Thu, 5 May 2022 10:39:28 +0000 (12:39 +0200)
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
src/crimson/osd/osdmap_gate.cc
src/crimson/osd/osdmap_gate.h

index 316596ab185df9f85e2947cc9f02cc0cd0d3a88c..be0f1c08dde1ad3817b4fc42d07cfe2918af0fbd 100644 (file)
@@ -22,32 +22,6 @@ void OSDMapGate<OSDMapGateTypeV>::OSDMapBlocker::dump_detail(Formatter *f) const
   f->close_section();
 }
 
-template <OSDMapGateType OSDMapGateTypeV>
-blocking_future<epoch_t> OSDMapGate<OSDMapGateTypeV>::wait_for_map(epoch_t epoch)
-{
-  if (__builtin_expect(stopping, false)) {
-    return make_exception_blocking_future<epoch_t>(
-       crimson::common::system_shutdown_exception());
-  }
-  if (current >= epoch) {
-    return make_ready_blocking_future<epoch_t>(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 <OSDMapGateType OSDMapGateTypeV>
 seastar::future<epoch_t> OSDMapGate<OSDMapGateTypeV>::wait_for_map(
   typename OSDMapBlocker::BlockingEvent::TriggerI&& trigger,
index f378b28825aae0c6a784f51d105025240e8bbb59..2604598d05b1050fde52dab7ced1f1cc54a32473 100644 (file)
@@ -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<epoch_t>
-  wait_for_map(epoch_t epoch);
   // TODO: define me!
   seastar::future<epoch_t>
   wait_for_map(typename OSDMapBlocker::BlockingEvent::TriggerI&& trigger,