mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-24 22:09:24 +00:00
Failed shard recovery can cause shard data to be deleted (replicas will still work), closes #1227.
This commit is contained in:
parent
80f9ea5bfe
commit
d25c939b97
@ -281,10 +281,12 @@ public class IndicesClusterStateService extends AbstractLifecycleComponent<Indic
|
|||||||
}
|
}
|
||||||
indexService.removeShard(existingShardId, "removing shard (index is closed)");
|
indexService.removeShard(existingShardId, "removing shard (index is closed)");
|
||||||
} else {
|
} else {
|
||||||
|
// we can just remove the shard, without cleaning it locally, since we will clean it
|
||||||
|
// when all shards are allocated in the IndicesStore
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("[{}][{}] cleaning shard locally (not allocated)", index, existingShardId);
|
logger.debug("[{}][{}] removing shard (not allocated)", index, existingShardId);
|
||||||
}
|
}
|
||||||
indexService.cleanShard(existingShardId, "cleaning shard locally (not allocated)");
|
indexService.removeShard(existingShardId, "removing shard (not allocated)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user