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)
commit503d824302de98ae7d9fd44c6c417ed651865919
tree10c0f89ce525c84163ab798fcd1994973880c935
parent43f18b836755a1167e831687a674d26611f9d3b2
BUG-8402: fix transmit accounting

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>
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/TransmitQueue.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/TransmittingTransmitQueueTest.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.