BUG 2970 : Recovery fails with SchemaValidationException when removing modules 05/22505/1
authorMoiz Raja <moraja@cisco.com>
Fri, 12 Jun 2015 01:29:07 +0000 (18:29 -0700)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 12 Jun 2015 21:28:56 +0000 (21:28 +0000)
commit2b0ddf57e4d3d2e78637a6762ae6b5a05128a3a1
tree59d56d6d0ca88323f4fe91e1d7910d71c87d6436
parentb98178af33bcb336abf6dda277495840b8ebcf63
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>
(cherry picked from commit 9a06d5de97157fdd497946f7c467c928344e0e67)
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]