BUG-8445: ignore responses from mismatched sessions 99/59599/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 28 Jun 2017 08:11:47 +0000 (10:11 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 28 Jun 2017 08:20:22 +0000 (10:20 +0200)
commit0ea09c71a5902f1ebf27ad683be634ded773e2c7
tree89c17a561fe7a07052306c760c7dd9c259b23038
parent5e986f5320c561953759a7beffb11db7e296817c
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>
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