BUG-8403: fix DONE state propagation 74/58274/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 5 Jun 2017 17:50:52 +0000 (19:50 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 5 Jun 2017 17:55:27 +0000 (19:55 +0200)
commitb135d9ab189dfd7443f895aa96160e22666cb266
tree3c24516ca1ea8581d9a098aa601d6de3b2ed9d22
parent9da46962e1dba6f25780b69dbc0dfb1865d19f23
BUG-8403: fix DONE state propagation

The DONE state detection logic in replayMessages() was flawed, as
we checked the current state, which is guaranteed to be SuccessorState.

We should be checking the previous state, available from the successor
state. As it turns out we can do this very cleanly by setting the flag
when the successor state gets the previous state assigned.

This also has better performance, as we do not touch the volatile
field multiple times.

Change-Id: Ica2246160bf8fee7aa134bbacb45857235405f6a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractProxyTransaction.java