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();
}
}
(*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 {
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));
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));
#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"
}
// 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;
#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"
#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 {
#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);
#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
}
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(); });
});
};
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");
}
// vim: ts=8 sw=2 smarttab
#include <boost/iterator/transform_iterator.hpp>
+#include <boost/iterator/filter_iterator.hpp>
#include <fmt/ranges.h>