Move commit payload propagation 65/76565/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 2 Oct 2018 15:20:16 +0000 (17:20 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 2 Oct 2018 15:20:16 +0000 (17:20 +0200)
commit4a97740e7fe14f99dc6f6f2b07e44f4123103ce0
treef8935cc1e4a1d32faaf1c78420457b1277e3776f
parent9e4b94dba7bddbbe13c357c88377657e57f2864c
Move commit payload propagation

Since Shard.persistPayload() will shortcut when we do not have
a followers or persistence, we must update metadata before we
notify the cohort of the success, as for commit-immediate
transactions that will result in a purge payload being persisted.
That payload will shortcut, too, and execute on stack, hence
metadata will see purge before commit -- leaving it in inconsistent
leaky state.

Move allMetadataCommittedTransaction() calls from
applyReplicatedPayload() down to just after we modify the data
tree and before we invoke listeners.

Change-Id: I1ed2f62756367982cfff08302c79f1c63a871df2
JIRA: CONTROLLER-1746
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.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.