Skip to content

Use correct recovery priority for unassigned shards#154974

Draft
PeteGillinElastic wants to merge 1 commit into
elastic:mainfrom
PeteGillinElastic:dnrt-recovery-priority-correct-values
Draft

Use correct recovery priority for unassigned shards#154974
PeteGillinElastic wants to merge 1 commit into
elastic:mainfrom
PeteGillinElastic:dnrt-recovery-priority-correct-values

Conversation

@PeteGillinElastic

Copy link
Copy Markdown
Member

This changes ShardRouting.newUnassigned() to use a RecoveryPriority derived from the UnassignedInfo.Reason, which should be the correct choice between UNASSIGNED_EXISTING and UNASSIGNED_NEW, rather than always using UNASSIGNED_EXISTING.

The validation on ShardRouting is strengthened to ensure that the RecoveryPriority is always consistent with the UnassignedInfo.

Relates elastic/elasticsearch-team#2918

@PeteGillinElastic PeteGillinElastic added >non-issue :Distributed/Recovery Anything around constructing a new shard, either from a local or a remote source. labels Jul 24, 2026
This changes `ShardRouting.newUnassigned()` to use a
`RecoveryPriority` derived from the `UnassignedInfo.Reason`, which
should be the correct choice between `UNASSIGNED_EXISTING` and
`UNASSIGNED_NEW`, rather than always using `UNASSIGNED_EXISTING`.

The validation on `ShardRouting` is strengthened to ensure that the
`RecoveryPriority` is always consistent with the `UnassignedInfo`.

Relates elastic/elasticsearch-team#2918
@PeteGillinElastic
PeteGillinElastic force-pushed the dnrt-recovery-priority-correct-values branch from 31f4cab to 07068e8 Compare July 24, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Recovery Anything around constructing a new shard, either from a local or a remote source. >non-issue v9.6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants