From: Robert Varga Date: Mon, 5 Jun 2017 17:50:52 +0000 (+0200) Subject: BUG-8403: fix DONE state propagation X-Git-Tag: release/carbon-sr1~46 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=b135d9ab189dfd7443f895aa96160e22666cb266 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 --- diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractProxyTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractProxyTransaction.java index 1eff70f6d9..3a463e5190 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractProxyTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractProxyTransaction.java @@ -147,13 +147,15 @@ abstract class AbstractProxyTransaction implements Identifiable