Force pruning during data migration 67/87067/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 21 Jan 2020 13:31:48 +0000 (14:31 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 22 Jan 2020 10:47:57 +0000 (11:47 +0100)
commitd19cf96d390ffcdba8b1f64a6dd3f3749ecc5872
tree6b2ce6b19949f334dece9b3538a07c2be6971050
parentb8529ed937c5cfb67770870677a281225502c11c
Force pruning during data migration

Our current PruningDataTreeModification performs pruning only in
two cases:
1) the root is being written (i.e. Snapshot recovery)
2) DataTree reports a validation issue

This is not sufficient for uint-type migration, as we have to
subject all writes and merges to pruning/translation irrespective
of where they occur.

Split up PruningDataTreeModification into two implementations,
Proactive and Reactive and use them as appropriate based on migration
requirements.

JIRA: CONTROLLER-1923
Change-Id: I4184c56380b7f52a8d7af6f17346f9c5edd31b28
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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/utils/PruningDataTreeModification.java
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/utils/PruningDataTreeModificationTest.java