Fix DistributesShardedDOMDataTree.ProxyProducer's getShardAccess 79/56579/1
authorJakub Morvay <jmorvay@cisco.com>
Tue, 2 May 2017 16:54:52 +0000 (18:54 +0200)
committerJakub Morvay <jmorvay@cisco.com>
Fri, 5 May 2017 08:42:13 +0000 (10:42 +0200)
commit14d8f67545ed36f9fd4aad9444248c82aa7615bd
tree3d5094a382e14dc25f52c9521ea92cc93e440b87
parent7eef6d3dc0454034c0b60011b4c786a84f90edc9
Fix DistributesShardedDOMDataTree.ProxyProducer's getShardAccess

DistributesShardedDOMDataTree.ProxyProducer's getShardAccess works only
for subtrees that are rooted at some registered prefix based shard.
Moreover subtree has to be one of the subtrees specified in
DistributedShardedDOMDatatTree's createProducer method.

This is way more strict than what is required by CDSDataTreeProducer's
API. Pass ProxyProducer's implementation current shard layout, so
producer can lookup corresponding shard for specified subtree in
getShardAccess method. One-to-one mapping between shards and subtrees
is no longer required.

Change-Id: I765567d34c803a85b4be8a6e10fd81b6f64a1610
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTreeTest.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.