1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 #include "logmissing_request_reply.h"
6 #include "common/Formatter.h"
8 #include "crimson/osd/osd.h"
9 #include "crimson/osd/osd_connection_priv.h"
10 #include "crimson/osd/osd_operation_external_tracking.h"
11 #include "crimson/osd/pg.h"
14 seastar::logger
& logger() {
15 return crimson::get_logger(ceph_subsys_osd
);
19 namespace crimson::osd
{
21 LogMissingRequestReply::LogMissingRequestReply(
22 crimson::net::ConnectionRef
&& conn
,
23 Ref
<MOSDPGUpdateLogMissingReply
> &&req
)
24 : conn
{std::move(conn
)},
28 void LogMissingRequestReply::print(std::ostream
& os
) const
30 os
<< "LogMissingRequestReply("
31 << "from=" << req
->from
36 void LogMissingRequestReply::dump_detail(Formatter
*f
) const
38 f
->open_object_section("LogMissingRequestReply");
39 f
->dump_stream("rep_tid") << req
->get_tid();
40 f
->dump_stream("pgid") << req
->get_spg();
41 f
->dump_unsigned("map_epoch", req
->get_map_epoch());
42 f
->dump_unsigned("min_epoch", req
->get_min_epoch());
43 f
->dump_stream("from") << req
->from
;
47 ConnectionPipeline
&LogMissingRequestReply::get_connection_pipeline()
49 return get_osd_priv(conn
.get()).replicated_request_conn_pipeline
;
52 ClientRequest::PGPipeline
&LogMissingRequestReply::pp(PG
&pg
)
54 return pg
.request_pg_pipeline
;
57 seastar::future
<> LogMissingRequestReply::with_pg(
58 ShardServices
&shard_services
, Ref
<PG
> pg
)
60 logger().debug("{}: LogMissingRequestReply::with_pg", *this);
63 return interruptor::with_interruption([this, pg
] {
64 return pg
->do_update_log_missing_reply(std::move(req
));
65 }, [ref
](std::exception_ptr
) { return seastar::now(); }, pg
);