Fix minor bug in ShardManager#removeShardReplica 63/39863/3
authorTom Pantelis <tpanteli@brocade.com>
Mon, 6 Jun 2016 01:25:07 +0000 (21:25 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Mon, 6 Jun 2016 03:48:07 +0000 (03:48 +0000)
https://git.opendaylight.org/gerrit/#/c/38086/ introdcued a minor bug in
ShardManager#removeShardReplica. The intention was to cleanup
shardReplicaOperationsInProgress on failure so the added line should be
a call to remove and not add.

Change-Id: I36e01f3da75655f39c169c230e9b424a1c6236b9
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManager.java

index 0f6425e..4156ab3 100644 (file)
@@ -346,7 +346,7 @@ class ShardManager extends AbstractUntypedPersistentActorWithMetering {
             @Override
             public void onComplete(Throwable failure, Object response) {
                 if (failure != null) {
-                    shardReplicaOperationsInProgress.add(shardName);
+                    shardReplicaOperationsInProgress.remove(shardName);
                     String msg = String.format("RemoveServer request to leader %s for shard %s failed",
                             primaryPath, shardName);