BUG-8403: fix DONE state propagation 87/58387/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 5 Jun 2017 17:50:52 +0000 (19:50 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 7 Jun 2017 08:20:30 +0000 (10:20 +0200)
commitb8c1ade398dbe557f8bff0c0510d02777c860730
treec5ea145ea28cc37b36b03087c0ff1d34561dc5c7
parent503b3586400a2de5d37f2b7e942b96856427b673
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>
(cherry picked from commit b135d9ab189dfd7443f895aa96160e22666cb266)
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractProxyTransaction.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.