BUG 2970 : Recovery fails with SchemaValidationException when removing modules 29/22429/5
authorMoiz Raja <moraja@cisco.com>
Fri, 12 Jun 2015 01:29:07 +0000 (18:29 -0700)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 12 Jun 2015 21:28:41 +0000 (21:28 +0000)
commit9a06d5de97157fdd497946f7c467c928344e0e67
tree7b564294ce28fe8c4a252036e9a9a2b4a838575c
parente267b7c507d570058b2feb488940cd3e89a78715
BUG 2970 : Recovery fails with SchemaValidationException when removing modules

My prior fixes for bug 2970 did not address the recovery problem when a module is
removed but it's data is still present in the persisted files. This patch attempts
to address that.

There seems to be no schema validation when you write a normalized node at / so
for when writing or merging at / the pruning is done first before attempting a
write on InMemoryDataTreeModification

Also removed all unneccessary code.

Change-Id: Id2793330441606c62dfd903cdd698c2f86b14c1b
Signed-off-by: Moiz Raja <moraja@cisco.com>
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodePruner.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/PruningShardDataTreeSnapshot.java [deleted file]
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java
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/ShardRecoveryCoordinator.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/PruningDataTreeModification.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/PruningShardDataTreeSnapshotTest.java [deleted file]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardRecoveryCoordinatorTest.java [new file with mode: 0644]