再試行上限に達したシャードを再割り当てする (reroute retry_failed)
Elasticsearchクラスタ / ノードコマンド
# Attempt count and last failure details:
GET _cluster/allocation/explain?filter_path=index,shard,unassigned_info.reason,unassigned_info.failed_allocation_attempts,unassigned_info.details,allocate_explanation
# After fixing the cause, retry shards that hit the limit:
POST _cluster/reroute?retry_failed=true&metric=none
# Recovery progress:
GET _cat/recovery?v&active_only=true&h=index,shard,stage,source_node,target_node,bytes_percent,translog_ops_percent概要
連続した失敗の後に割り当てが停止されたシャード (ALLOCATION_FAILED、max_retry) の失敗の詳細を表示し、再度割り当てをトリガーする。リカバリの進捗を監視する。
使用する場面
allocation explain で 'shard has exceeded the maximum number of retries' と表示された場合。ディスク満杯、translog の破損、一時的なネットワークの問題が解決した後に。
注意
原因を修正せずに retry_failed を実行すると、シャードはさらに 5 回試行して再び失敗する。まず unassigned_info.details のエラーを解決する。多数のシャードが一度にリカバリに入ると、ネットワークとディスクの負荷が上がる。これは cluster.routing.allocation.node_concurrent_recoveries と indices.recovery.max_bytes_per_sec で制限される。