Skip to content

Commit 345899e

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 31d6278 commit 345899e

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
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
}

server/src/test/java/org/elasticsearch/gateway/GatewayIndexStateIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ public boolean clearData(String nodeName) {
322322
* This test ensures that when an index deletion takes place while a node is offline, when that
323323
* node rejoins the cluster, it deletes the index locally instead of importing it as a dangling index.
324324
*/
325-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/33613")
326325
public void testIndexDeletionWhenNodeRejoins() throws Exception {
327326
final String indexName = "test-index-del-on-node-rejoin-idx";
328327
final int numNodes = 2;

0 commit comments

Comments
 (0)