BUG-8402: fix transmit accounting 16/57216/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 16 May 2017 14:49:42 +0000 (16:49 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Wed, 17 May 2017 01:19:20 +0000 (01:19 +0000)
CSIT has shown that during burst activity and leader movement
we can lose track of messages and the requests can arrive misordered.

As it turns out TransmitQueue.complete() transmit-on-response code
path fails to properly move the request to the in-flight queue.

Furthermore, opportunistic sending TransmitQueue.enqueue() could cause
message reordering if for some reason we have pending requests and
available transmit slot.

Fix this sharing the codepaths and making the TransmitQueue.enqueue()
check pending queue emptiness.

Change-Id: I2daf3d8b198e83c6f50f4a2f43b9e4c3cc091187
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>

No differences found