if (failure != null) {
LOG.debug("Resolution of cookie {} shard {} failed, removing state", cookie, shardName, failure);
backends.remove(cookie, toInsert);
if (failure != null) {
LOG.debug("Resolution of cookie {} shard {} failed, removing state", cookie, shardName, failure);
backends.remove(cookie, toInsert);