Fix shard commit deadlock 50/72650/3
authorTom Pantelis <tompantelis@gmail.com>
Mon, 4 Jun 2018 12:20:26 +0000 (08:20 -0400)
committerRobert Varga <nite@hq.sk>
Tue, 5 Jun 2018 07:26:23 +0000 (07:26 +0000)
commit17b8a7d3f93e8030c2fe22612f4112f680660fd8
tree8e435444f71f48b9a910b9ab4747ade4c0d337ba
parentc035f52b5f408565063f1c24801f0e7b94c8bf5e
Fix shard commit deadlock

When performing coordinated commits we need to ensure transactions
hit all shards in the same order as otherwise we could end up
with an ABBA deadlock -- which gets resolved through commits timing
out, but nevertheless it imposes a dealy of up to 30 seconds.

Make sure we always send entries to shards in the same order and
also synchronize all TransactionProxy instances so that transactions
have a total order.

JIRA: CONTROLLER-1833
Change-Id: Ia3076efde1c7cb5f115305593776ffa7422e7a09
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionProxy.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.