mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
AsyncConnection: Fix msgr send bytes perf counter statistic
prepare_send_message may be called twice, we need to move to write_message Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
This commit is contained in:
parent
c71a2f5a6b
commit
53d6c1f179
@ -2238,7 +2238,6 @@ void AsyncConnection::prepare_send_message(uint64_t features, Message *m, buffer
|
||||
old_footer.flags = footer.flags;
|
||||
bl.append((char*)&old_footer, sizeof(old_footer));
|
||||
}
|
||||
logger->inc(l_msgr_send_bytes, bl.length());
|
||||
}
|
||||
|
||||
int AsyncConnection::write_message(Message *m, bufferlist& bl)
|
||||
@ -2276,6 +2275,7 @@ int AsyncConnection::write_message(Message *m, bufferlist& bl)
|
||||
|
||||
complete_bl.claim_append(bl);
|
||||
|
||||
logger->inc(l_msgr_send_bytes, bl.length());
|
||||
ldout(async_msgr->cct, 20) << __func__ << " sending " << m->get_seq()
|
||||
<< " " << m << dendl;
|
||||
int rc = _try_send(complete_bl);
|
||||
|
Loading…
Reference in New Issue
Block a user