]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: bump up seastar fixes
authorMatan Breizman <mbreizma@redhat.com>
Sun, 9 Feb 2025 14:50:53 +0000 (14:50 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Mon, 3 Mar 2025 09:31:21 +0000 (09:31 +0000)
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/admin/osd_admin.cc
src/crimson/common/config_proxy.h
src/crimson/common/errorator-loop.h
src/crimson/common/interruptible_future.h
src/crimson/osd/main.cc
src/crimson/osd/main_config_bootstrap_helpers.cc
src/crimson/osd/osd_operations/pg_advance_map.cc
src/crimson/osd/shard_services.cc
src/crimson/osd/stop_signal.h
src/test/crimson/test_alienstore_thread_pool.cc
src/test/crimson/test_crimson_scrub.cc

index 12b006fee9e5380ea28abf6b7e1392e4c6f4c482..761d5ef50a922ec516db9f3588defc94f1016b86 100644 (file)
@@ -343,7 +343,7 @@ public:
           for (const auto& [labels, metric] : metric_family) {
             if (metric && metric->is_enabled()) {
              f->open_object_section(""); // enclosed by array
-              DumpMetricsHook::dump_metric_value(f, full_name, *metric, labels);
+              DumpMetricsHook::dump_metric_value(f, full_name, *metric, labels.labels());
              f->close_section();
             }
           }
index b04fbee2e8a7506fda3b882e1e66668086ab9a98..fce86f2389cb1ac3c0144136ccefe49cad9f9138 100644 (file)
@@ -73,7 +73,7 @@ class ConfigProxy : public seastar::peering_sharded_service<ConfigProxy>
         (*obs)->handle_conf_change(owner, keys);
       }
 
-      return seastar::parallel_for_each(boost::irange(1u, seastar::smp::count),
+      return seastar::parallel_for_each(std::views::iota(1u, seastar::smp::count),
                                         [&owner, new_values] (auto cpu) {
         return owner.container().invoke_on(cpu,
           [foreign_values = seastar::make_foreign(new_values)](ConfigProxy& proxy) mutable {
index bb3b7fb15c60c33a3b82f0accd56a13598f80d56..f53361bea653d5df6e64288edefb65722269719f 100644 (file)
@@ -70,9 +70,8 @@ parallel_for_each(Iterator first, Iterator last, Func&& func) noexcept {
     auto f = seastar::futurize_invoke(std::forward<Func>(func), *first);
     if (!f.available() || f.failed()) {
       if (!s) {
-        using itraits = std::iterator_traits<Iterator>;
         auto n = (seastar::internal::iterator_range_estimate_vector_capacity(
-              first, last, typename itraits::iterator_category()) + 1);
+              first, last) + 1);
         s = new parallel_for_each_state<AllowedErrors...>(n);
       }
       s->add_future(std::move(f));
index 01fe1b192c43587914ee4d58381d642f1fc38eb2..a3cdacbc6d66171a89d903a8897d3d667590fc18 100644 (file)
@@ -1403,9 +1403,8 @@ public:
       auto f = seastar::futurize_invoke(decorated_func, *begin++);
       if (!f.available() || f.failed()) {
        if (!s) {
-         using itraits = std::iterator_traits<Iterator>;
          auto n = (seastar::internal::iterator_range_estimate_vector_capacity(
-               begin, end, typename itraits::iterator_category()) + 1);
+               begin, end) + 1);
          s = new parallel_for_each_state<InterruptCond, ResultType>(n);
        }
        s->add_future(std::move(f));
index 0bfd3e2266b045a234d159813ff3957bb7b806bd..2173aa4bb8c80030b273d58f6ea4c8f84bfde470 100644 (file)
@@ -17,6 +17,7 @@
 #include <seastar/util/closeable.hh>
 #include <seastar/util/defer.hh>
 #include <seastar/util/std-compat.hh>
+#include <seastar/core/signal.hh>
 
 #include "auth/KeyRing.h"
 #include "common/ceph_argparse.h"
@@ -161,7 +162,7 @@ int main(int argc, const char* argv[])
           }
           // just ignore SIGHUP, we don't reread settings. keep in mind signals
           // handled by S* must be blocked for alien threads (see AlienStore).
-          seastar::engine().handle_signal(SIGHUP, [] {});
+          seastar::handle_signal(SIGHUP, [] {});
 
           // start prometheus API server
           seastar::httpd::http_server_control prom_server;
index e4920eb870f386ec9bbf18d7f1033641414f5929..0093f6cff765d1c74bdff85567a4b9ac589cb7b7 100644 (file)
@@ -11,6 +11,7 @@
 #include <seastar/util/closeable.hh>
 #include <seastar/util/defer.hh>
 #include <seastar/util/std-compat.hh>
+#include <seastar/core/app-template.hh>
 
 #include "common/ceph_argparse.h"
 #include "common/config_tracker.h"
index abfd56a7d7b59942c196970c8c03330c9ac48873..c8fa56adb1a8b7a0a7b75a110990fe444bb1777b 100644 (file)
@@ -10,6 +10,7 @@
 #include "crimson/osd/shard_services.h"
 #include "crimson/osd/osd_operations/pg_advance_map.h"
 #include "crimson/osd/osd_operation_external_tracking.h"
+#include <boost/iterator/counting_iterator.hpp>
 #include "osd/PeeringState.h"
 
 namespace {
index cf78fb3e34d4887c78b1e1aed3e2ec03408667d3..517cf6580bd34a5a453b47cbb9ee4456c58390de 100644 (file)
@@ -23,6 +23,7 @@
 #include "crimson/osd/osd_operations/pg_advance_map.h"
 #include "crimson/osd/pg.h"
 #include "crimson/osd/pg_meta.h"
+#include <boost/iterator/counting_iterator.hpp>
 
 SET_SUBSYS(osd);
 
index 951f8d4b7fcfe20f4455ebb1ba831d12455b0e7f..385dfbbcfa7afcce5e48c8d3370bde56956b4363 100644 (file)
@@ -25,6 +25,7 @@
 #include <seastar/core/abort_source.hh>
 #include <seastar/core/reactor.hh>
 #include <seastar/core/condition-variable.hh>
+#include <seastar/core/signal.hh>
 
 /// Seastar apps lib namespace
 
@@ -62,13 +63,13 @@ private:
     }
 public:
     stop_signal() {
-        seastar::engine().handle_signal(SIGINT, [this] { on_signal(); });
-        seastar::engine().handle_signal(SIGTERM, [this] { on_signal(); });
+        seastar::handle_signal(SIGINT, [this] { on_signal(); });
+        seastar::handle_signal(SIGTERM, [this] { on_signal(); });
     }
     ~stop_signal() {
         // There's no way to unregister a handler yet, so register a no-op handler instead.
-        seastar::engine().handle_signal(SIGINT, [] {});
-        seastar::engine().handle_signal(SIGTERM, [] {});
+        seastar::handle_signal(SIGINT, [] {});
+        seastar::handle_signal(SIGTERM, [] {});
     }
     seastar::future<> wait() {
         return _cond.wait([this] { return _abort_source.abort_requested(); });
index 5f8e2d1b707c5f652e1fbfd120a5da041c54dc36..72c3a4e20cdca98a06e1212e4c6cab0844ad2978 100644 (file)
@@ -22,8 +22,8 @@ seastar::future<> test_accumulate(ThreadPool& tp) {
     });
   };
   return seastar::map_reduce(
-    boost::irange(0, N), slow_plus, 0, std::plus{}).then([] (int sum) {
-    auto r = boost::irange(0 + M, N + M);
+    std::views::iota(0, N), slow_plus, 0, std::plus{}).then([] (int sum) {
+    auto r = std::views::iota(0 + M, N + M);
     if (sum != std::accumulate(r.begin(), r.end(), 0)) {
       throw std::runtime_error("test_accumulate failed");
     }
index 6548f6d9973db64d4b3962caf9df55849fe5ea6a..22b417ffd154baf0ddaa6cb14e4dcff143f755df 100644 (file)
@@ -2,6 +2,7 @@
 // vim: ts=8 sw=2 smarttab
 
 #include <boost/iterator/transform_iterator.hpp>
+#include <boost/iterator/filter_iterator.hpp>
 
 #include <fmt/ranges.h>