mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-06 19:09:14 +00:00
Relocation of shards causes bulk indexing client to hang, closes #1839.
This commit is contained in:
parent
c26934be36
commit
824b0bd347
@ -452,7 +452,7 @@ public abstract class TransportShardReplicationOperationAction<Request extends S
|
|||||||
public void handleException(TransportException exp) {
|
public void handleException(TransportException exp) {
|
||||||
// if we got disconnected from the node, or the node / shard is not in the right state (being closed)
|
// if we got disconnected from the node, or the node / shard is not in the right state (being closed)
|
||||||
if (exp.unwrapCause() instanceof ConnectTransportException || exp.unwrapCause() instanceof NodeClosedException ||
|
if (exp.unwrapCause() instanceof ConnectTransportException || exp.unwrapCause() instanceof NodeClosedException ||
|
||||||
exp.unwrapCause() instanceof IllegalIndexShardStateException) {
|
retryPrimaryException(exp)) {
|
||||||
primaryOperationStarted.set(false);
|
primaryOperationStarted.set(false);
|
||||||
// we already marked it as started when we executed it (removed the listener) so pass false
|
// we already marked it as started when we executed it (removed the listener) so pass false
|
||||||
// to re-add to the cluster listener
|
// to re-add to the cluster listener
|
||||||
@ -530,6 +530,7 @@ public abstract class TransportShardReplicationOperationAction<Request extends S
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// shard has not been allocated yet, retry it here
|
// shard has not been allocated yet, retry it here
|
||||||
if (retryPrimaryException(e)) {
|
if (retryPrimaryException(e)) {
|
||||||
|
primaryOperationStarted.set(false);
|
||||||
retry(fromDiscoveryListener, null);
|
retry(fromDiscoveryListener, null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user