Skip to content

Commit 6a69aae

Browse files
committed
Resync fails to notify on unavaiable exceptions (#33615)
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
1 parent 4d5c4b4 commit 6a69aae

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

server/src/main/java/org/elasticsearch/action/resync/TransportResyncReplicationAction.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import org.elasticsearch.Version;
2323
import org.elasticsearch.action.ActionListener;
2424
import org.elasticsearch.action.support.ActionFilters;
25-
import org.elasticsearch.action.support.TransportActions;
2625
import org.elasticsearch.action.support.replication.ReplicationOperation;
2726
import org.elasticsearch.action.support.replication.ReplicationResponse;
2827
import org.elasticsearch.action.support.replication.TransportReplicationAction;
@@ -171,12 +170,7 @@ public void handleResponse(ResyncReplicationResponse response) {
171170

172171
@Override
173172
public void handleException(TransportException exp) {
174-
final Throwable cause = exp.unwrapCause();
175-
if (TransportActions.isShardNotAvailableException(cause)) {
176-
logger.trace("primary became unavailable during resync, ignoring", exp);
177-
} else {
178-
listener.onFailure(exp);
179-
}
173+
listener.onFailure(exp);
180174
}
181175
});
182176
}

0 commit comments

Comments
 (0)