@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);