BUG 2792 : Serialize phase processing in ConcurrentDOMDatBroker 36/17136/1
authorMoiz Raja <moraja@cisco.com>
Wed, 25 Mar 2015 22:44:34 +0000 (15:44 -0700)
committerMoiz Raja <moraja@cisco.com>
Wed, 25 Mar 2015 22:44:34 +0000 (15:44 -0700)
commit4d432d257cd02eedeca388d150fa95fa49da62c5
tree86d07d3f412a001e29bbcb38585fc9dd73faae1b
parent4349b034606957d3e876b82b14a292e6739a986a
BUG 2792 : Serialize phase processing in ConcurrentDOMDatBroker

Ensure that any given submit phase is completed for a cohort before
proceeding to run the same submit phase on the next cohort in the
transaction.

For example if a transaction has 2 cohorts then canCommit on cohort1
must complete before we proceed to canCommit on cohort2.

If we try to concurrently try to process the phase on all cohorts in
a transaction it can lead to deadlocks as outlined in the bug

Change-Id: I4e758770c711d92920a456e2ac3757ebbb63eb46
Signed-off-by: Moiz Raja <moraja@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ConcurrentDOMDataBroker.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ConcurrentDOMDataBrokerTest.java [moved from opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DOMConcurrentDataCommitCoordinatorTest.java with 99% similarity]