]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
msg/async: fix is_queued() semantics 24693/head
authorIlya Dryomov <idryomov@gmail.com>
Fri, 19 Oct 2018 17:34:19 +0000 (19:34 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 19 Oct 2018 18:25:12 +0000 (20:25 +0200)
commitb7a62742fcb7cbfca0766e34530d784aef8a6b98
treebceca09e60433cbf26b248330cc087db87294f13
parentcb4896338518f2291e12959695fb838c2d4a50aa
msg/async: fix is_queued() semantics

Before AsyncConnection was split into two classes as part of the
multi-protocol refactor, we only had AsyncConnection::is_queued().
It checked both out_q and outcoming_bl because out_q was part of
AsyncConnection.

out_q is now part of ProtocolV1.  AsyncConnection should no longer be
concerned with out_q, only with outcoming_bl.  Checking whether out_q
is empty in _try_send() is particuarly wrong because if the write is
fininished (i.e. outcoming_bl is empty) but out_q has something in it,
the write callback isn't invoked.

Although probably not strictly necessary, this commit preserves the
semantics of connection->is_queued() in Protocol.cc.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/msg/async/AsyncConnection.cc
src/msg/async/Protocol.cc