]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
msg/async: fix outgoing_bl overflow and reset state_offset
authorVicente Cheng <vicente_cheng@bigtera.com>
Fri, 10 Dec 2021 06:49:55 +0000 (06:49 +0000)
committerVicente Cheng <freeze.bilsted@gmail.com>
Tue, 8 Feb 2022 14:13:14 +0000 (14:13 +0000)
commitcfca2daf3121a58d92b64fae9b99953dc082a0a6
treedecec6f46a51a7b1a3e608135fc2c8c7044f2698
parent62f0140d80a7564d3db377153a3cd87b3816d497
msg/async: fix outgoing_bl overflow and reset state_offset

    - we should reset state_offset when read done.

    - check outgoing_bl before we try to write a message.

    In some environments, network would temporily block and return EAGAIN.
    For async msgr, we would callback the write event directly, but that still
    increase the outgoing_bl.

    Think about this case, the sender is in congestion or network driver
    has some problems. The data appended to outgoing_bl and outgoing_bl
    is not consumed up-to-date immediately.
    That size of outgoing_bl will increase with time then overflow.
    The wrong outgoing_bl would cause some problems so we need to wait
    for outgoing_bl before we appended another message.

Signed-off-by: Vicente Cheng <vicente_cheng@bigtera.com>
src/msg/async/AsyncConnection.cc
src/msg/async/ProtocolV1.cc
src/msg/async/ProtocolV2.cc