X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fsharding%2FShardedDataTreeActor.java;h=1b33ad7476473c65561a6368ba6b6d64b63ae7d1;hb=644bc122ad34d83e451a8b6a844aef98110f96e3;hp=671fbb89652b42ed1b34a2623346715ef6d559c1;hpb=be3bc49185f935ad2672b08e031f602eca594d1e;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardedDataTreeActor.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardedDataTreeActor.java index 671fbb8965..1b33ad7476 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardedDataTreeActor.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/ShardedDataTreeActor.java @@ -102,7 +102,7 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor { private final Cluster cluster; - private Map currentConfiguration = new HashMap<>(); + private final Map currentConfiguration = new HashMap<>(); ShardedDataTreeActor(final ShardedDataTreeActorCreator builder) { LOG.debug("Creating ShardedDataTreeActor on {}", builder.getClusterWrapper().getCurrentMemberName()); @@ -364,7 +364,7 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor { // schedule a notification task for the reply actorSystem.scheduler().scheduleOnce(SHARD_LOOKUP_TASK_INTERVAL, new ConfigShardLookupTask( - actorSystem, getSender(), context, clusterWrapper, message, lookupTaskMaxRetries), + actorSystem, getSender(), context, message, lookupTaskMaxRetries), actorSystem.dispatcher()); } @@ -664,21 +664,16 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor { private final ActorSystem system; private final ActorRef replyTo; private final ActorContext context; - private final ClusterWrapper clusterWrapper; - private final int lookupTaskMaxRetries; ConfigShardLookupTask(final ActorSystem system, final ActorRef replyTo, final ActorContext context, - final ClusterWrapper clusterWrapper, final StartConfigShardLookup message, final int lookupMaxRetries) { super(replyTo, lookupMaxRetries); this.system = system; this.replyTo = replyTo; this.context = context; - this.clusterWrapper = clusterWrapper; - this.lookupTaskMaxRetries = lookupMaxRetries; } @Override @@ -696,12 +691,8 @@ public class ShardedDataTreeActor extends AbstractUntypedPersistentActor { if (!localShard.isPresent()) { tryReschedule(null); } else { - LOG.debug("Local backend for prefix configuration shard lookup successful, starting leader lookup.."); - system.scheduler().scheduleOnce( - SHARD_LOOKUP_TASK_INTERVAL, - new ConfigShardReadinessTask( - system, replyTo, context, clusterWrapper, localShard.get(), lookupTaskMaxRetries), - system.dispatcher()); + LOG.debug("Local backend for prefix configuration shard lookup successful"); + replyTo.tell(new Status.Success(null), noSender()); } } }