Fix shard commit deadlock 57/72657/3
authorTom Pantelis <tompantelis@gmail.com>
Mon, 4 Jun 2018 12:20:26 +0000 (08:20 -0400)
committerRobert Varga <nite@hq.sk>
Mon, 4 Jun 2018 14:29:39 +0000 (14:29 +0000)
commit2303bc40f89c087f011336becdcda1475b378978
tree919ca26d7f26ced1fb5577e54964cb85d4be6d00
parent9a3ef1431ae52c76f700fa3cb62a1f08fbd84cf6
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