]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/mon: keep a copy of sent MMonCommand messages 39798/head
authorKefu Chai <kchai@redhat.com>
Wed, 3 Mar 2021 03:39:36 +0000 (11:39 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 3 Mar 2021 03:41:38 +0000 (11:41 +0800)
commita97706160277b8430dc22b1a951b55e420221886
tree98e1edb9385d03f082e0050b9c863eb74e60e327
parentd4a6a97f5b903549f17a853cc5f3df0c6079f85a
crimson/mon: keep a copy of sent MMonCommand messages

as per Yingxin Cheng,

> The send process can be asynchronous (there is a conn.out_q, or if the
> underlying socket lives in a different core in the m:n model to be
> ordered there). If user really wants to reuse a message, they must be
> careful not to modify it because it may result in modifing the pending
> messages.
>
> I think the best way is to copy the message if user want to resend it,
> and keep the ceph_assert(!msg->get_seq()). It may looks good to reuse a
> message under lossy policy, but the correctness is now up to user not to
> modify it inplace.

see also https://github.com/ceph/ceph/pull/39786

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/mon/MonClient.cc