BUG-2138: DistributedShardListeners support for nested shards
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / sharding / ShardedDataTreeActor.java
index 63fd4a0..04a7562 100644 (file)
@@ -275,8 +275,8 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor {
     private void onProducerCreated(final ProducerCreated message) {
         LOG.debug("Received ProducerCreated: {}", message);
 
-        // fastpath if no replication is needed, since there is only one node
-        if (resolver.getShardingServicePeerActorAddresses().size() == 1) {
+        // fastpath if we have no peers
+        if (resolver.getShardingServicePeerActorAddresses().isEmpty()) {
             getSender().tell(new Status.Success(null), noSender());
         }