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
This commit is contained in:
parent
b2f78e5a47
commit
b097eff342
|
@ -22,7 +22,6 @@ import org.apache.logging.log4j.message.ParameterizedMessage;
|
|||
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;
|
||||
|
@ -171,12 +170,7 @@ public class TransportResyncReplicationAction extends TransportWriteAction<Resyn
|
|||
|
||||
@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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -322,7 +322,6 @@ public class GatewayIndexStateIT extends ESIntegTestCase {
|
|||
* This test ensures that when an index deletion takes place while a node is offline, when that
|
||||
* node rejoins the cluster, it deletes the index locally instead of importing it as a dangling index.
|
||||
*/
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/33613")
|
||||
public void testIndexDeletionWhenNodeRejoins() throws Exception {
|
||||
final String indexName = "test-index-del-on-node-rejoin-idx";
|
||||
final int numNodes = 2;
|
||||
|
|
Loading…
Reference in New Issue