From: Tomas Cere Date: Tue, 20 Dec 2016 16:21:55 +0000 (+0100) Subject: BUG-2138: Fix shard registration with ProxyProducers. X-Git-Tag: release/carbon~154 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=9186550a83102cb0a13273c400bd3dadb345f8ba BUG-2138: Fix shard registration with ProxyProducers. Change-Id: I42f8f3cfaf9c0ef20b247abff2bec966ce5eeaa4 Signed-off-by: Tomas Cere --- diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java index 9c5f5b21df..69dfe4c7b7 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java @@ -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); }