Skip to content

Commit

Permalink
Resync fails to notify on unavaiable exceptions (#33615)
Browse files Browse the repository at this point in the history
We fail to notify the resync listener if the resync replication hits a
shard unavailable exception. Moreover, we no longer need to swallow
these unavailable exceptions.

Relates #28571
Closes #33613
  • Loading branch information
dnhatn committed Sep 13, 2018
1 parent 4d5c4b4 commit 6a69aae
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.elasticsearch.Version;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.support.ActionFilters;
import org.elasticsearch.action.support.TransportActions;
import org.elasticsearch.action.support.replication.ReplicationOperation;
import org.elasticsearch.action.support.replication.ReplicationResponse;
import org.elasticsearch.action.support.replication.TransportReplicationAction;
Expand Down Expand Up @@ -171,12 +170,7 @@ public void handleResponse(ResyncReplicationResponse response) {

@Override
public void handleException(TransportException exp) {
final Throwable cause = exp.unwrapCause();
if (TransportActions.isShardNotAvailableException(cause)) {
logger.trace("primary became unavailable during resync, ignoring", exp);
} else {
listener.onFailure(exp);
}
listener.onFailure(exp);
}
});
}
Expand Down

0 comments on commit 6a69aae

Please sign in to comment.