MCPcopy Create free account
hub / github.com/ceph/ceph / send_reply

Method send_reply

src/mon/Monitor.cc:4350–4388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4348}
4349
4350void Monitor::send_reply(MonOpRequestRef op, Message *reply)
4351{
4352 op->mark_event(__func__);
4353
4354 MonSession *session = op->get_session();
4355 ceph_assert(session);
4356 Message *req = op->get_req();
4357 ConnectionRef con = op->get_connection();
4358
4359 reply->set_cct(g_ceph_context);
4360 dout(2) << __func__ << " " << op << " " << reply << " " << *reply << dendl;
4361
4362 if (!con) {
4363 dout(2) << "send_reply no connection, dropping reply " << *reply
4364 << " to " << req << " " << *req << dendl;
4365 reply->put();
4366 op->mark_event("reply: no connection");
4367 return;
4368 }
4369
4370 if (!session->con && !session->proxy_con) {
4371 dout(2) << "send_reply no connection, dropping reply " << *reply
4372 << " to " << req << " " << *req << dendl;
4373 reply->put();
4374 op->mark_event("reply: no connection");
4375 return;
4376 }
4377
4378 if (session->proxy_con) {
4379 dout(15) << "send_reply routing reply to " << con->get_peer_addr()
4380 << " via " << session->proxy_con->get_peer_addr()
4381 << " for request " << *req << dendl;
4382 session->proxy_con->send_message(new MRoute(session->proxy_tid, reply));
4383 op->mark_event("reply: send routed request");
4384 } else {
4385 session->con->send_message(reply);
4386 op->mark_event("reply: send");
4387 }
4388}
4389
4390void Monitor::no_reply(MonOpRequestRef op)
4391{

Callers 15

preprocess_beaconMethod · 0.80
prepare_beaconMethod · 0.80
_updatedMethod · 0.80
prepare_beaconMethod · 0.80
_finishMethod · 0.80
_updated_logMethod · 0.80
prep_authMethod · 0.80
preprocess_statfsMethod · 0.80
preprocess_get_osdmapMethod · 0.80
_finishMethod · 0.80

Calls 8

mark_eventMethod · 0.80
get_sessionMethod · 0.45
get_reqMethod · 0.45
get_connectionMethod · 0.45
set_cctMethod · 0.45
putMethod · 0.45
get_peer_addrMethod · 0.45
send_messageMethod · 0.45

Tested by

no test coverage detected