BUG-8618: eliminate SimpleShardDataTreeCohort subclasses 18/60418/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 3 Jul 2017 17:57:38 +0000 (19:57 +0200)
committerRobert Varga <nite@hq.sk>
Sat, 15 Jul 2017 08:47:58 +0000 (08:47 +0000)
commitcd3a0e09db5a1def00c46a4be245dbdf648b539c
tree69f4dd8b8433e674c6eb60f2c4f32216e4640004
parent7991491f2854dde2ec625ed6c08b44df7d258795
BUG-8618: eliminate SimpleShardDataTreeCohort subclasses

Now that we handle pre-cancommit failures useing reportFailure(),
there is no need to have specialized subclasses for cohorts, as
the initial failure can cleanly be handled via nextFailure.

This also places a guard in reportFailure() so we do not override
a failure once it is set -- which should only happen in the case
of a dead-on-arrival transaction and it timing out in READY state.

Change-Id: I057c5b36006843f51d60034d30af83bac4e02cd7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2783c9dffdd91dae87d3351f4ebffbd8679e3133)
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohort.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java