BUG-8445: ignore responses from mismatched sessions 16/59616/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 28 Jun 2017 08:11:47 +0000 (10:11 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Wed, 28 Jun 2017 12:31:59 +0000 (12:31 +0000)
commitaabd940f4eb88df7cc4ba1a6b6a061ffb864960c
tree56fbc78783fc94a028b93eff54f5ba870e0b3d50
parentc39ff0e71a8331e2cf9bf459c6c787f0272251ed
BUG-8445: ignore responses from mismatched sessions

We have to check the session ID of the response in order not to
wreck transmit consistency if face of leader changes and reconnects.

If we reconnect the connection to the new leader before we saw all
responses from the old leader, we end up in a situation where the
old leader completes some of the replayed messages before we either
send them to the new leader or receive (the correct) reply.

Guard against this by checking the session ID before attempting to
pair a response to a request.

Change-Id: I28fa98b89c679715c3a0c546962d00533e76aa5d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 0ea09c71a5902f1ebf27ad683be634ded773e2c7)
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AbstractClientConnection.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AbstractReceivingClientConnection.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.