BUG-2138: Fix shard registration with ProxyProducers. 63/49663/26
authorTomas Cere <tcere@cisco.com>
Tue, 20 Dec 2016 16:21:55 +0000 (17:21 +0100)
committerJakub Morvay <jmorvay@cisco.com>
Sat, 18 Mar 2017 08:47:21 +0000 (09:47 +0100)
Change-Id: I42f8f3cfaf9c0ef20b247abff2bec966ce5eeaa4
Signed-off-by: Tomas Cere <tcere@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java

index 9c5f5b2..69dfe4c 100644 (file)
@@ -293,6 +293,10 @@ public class DistributedShardedDOMDataTree implements DOMDataTreeService, DOMDat
 
         LOG.debug("Registering shard[{}] at prefix: {}", shard, prefix);
 
+        if (producer instanceof ProxyProducer) {
+            return shardedDOMDataTree.registerDataTreeShard(prefix, shard, ((ProxyProducer) producer).delegate());
+        }
+
         return shardedDOMDataTree.registerDataTreeShard(prefix, shard, producer);
     }
 

©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.