From: Jianpeng Ma Date: Fri, 6 Sep 2019 08:18:13 +0000 (+0800) Subject: msg/async: clear_payload when requeue_sent. X-Git-Tag: v15.1.0~1479^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=95d572f922b3676250a198c84f4ad207983a55da;p=ceph.git msg/async: clear_payload when requeue_sent. If requeue_sent becasue replace, ther connection maybe change. And Message in sent already encoded. So we should clear payload. Signed-off-by: Jianpeng Ma --- diff --git a/src/msg/async/ProtocolV1.cc b/src/msg/async/ProtocolV1.cc index 2c7121a9c80d..a55505d5e6c5 100644 --- a/src/msg/async/ProtocolV1.cc +++ b/src/msg/async/ProtocolV1.cc @@ -1206,6 +1206,7 @@ void ProtocolV1::requeue_sent() { sent.pop_back(); ldout(cct, 10) << __func__ << " " << *m << " for resend " << " (" << m->get_seq() << ")" << dendl; + m->clear_payload(); rq.push_front(make_pair(bufferlist(), m)); } } diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index 7e98f55d6688..45a463c9ec65 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -195,6 +195,7 @@ void ProtocolV2::requeue_sent() { ldout(cct, 5) << __func__ << " requeueing message m=" << m << " seq=" << m->get_seq() << " type=" << m->get_type() << " " << *m << dendl; + m->clear_payload(); rq.emplace_front(out_queue_entry_t{false, m}); } }