Skip to content

Add extension points to remediate index metadata in during snapshot restore#131706

Merged
jbaiera merged 7 commits intoelastic:mainfrom
jbaiera:remediate-failure-store-allocation-settings
Jul 29, 2025
Merged

Add extension points to remediate index metadata in during snapshot restore#131706
jbaiera merged 7 commits intoelastic:mainfrom
jbaiera:remediate-failure-store-allocation-settings

Conversation

@jbaiera
Copy link
Member

@jbaiera jbaiera commented Jul 22, 2025

Adds a new SPI to allow plugins to hook into the snapshot restore process in order to remediate index metadata before accepting it into the cluster state.

@jbaiera jbaiera requested a review from a team as a code owner July 22, 2025 16:12
@jbaiera jbaiera added :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v9.2.0 v9.1.1 labels Jul 22, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Coordination (obsolete) Meta label for Distributed Coordination team. Obsolete. Please do not use. label Jul 22, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)

@elasticsearchmachine
Copy link
Collaborator

Hi @jbaiera, I've created a changelog YAML for you.

@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Jul 22, 2025
@jbaiera jbaiera requested a review from DaveCTurner July 22, 2025 16:16
Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Production change seems fine to me. However I don't think SnapshotResiliencyTests are quite the right place for this. Instead, could we add a test case to RestoreSnapshotIT (or maybe another AbstractSnapshotIntegTestCase?) covering this specific change. I'd want us to be injecting the transformer via a plugin (i.e. overriding org.elasticsearch.test.ESIntegTestCase#nodePlugins).

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes also this is a very temporary change right? We can drop it as soon as all the affected snapshots have expired. It'd be worth mentioning this in the javadocs.

jbaiera added 2 commits July 28, 2025 16:24
Add javadoc to new interface, move tests into their own locate outside the resiliency tests.
@jbaiera jbaiera requested review from DaveCTurner and dakrone July 28, 2025 20:28
Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM2

@jbaiera jbaiera merged commit dc3ee44 into elastic:main Jul 29, 2025
33 checks passed
@jbaiera jbaiera deleted the remediate-failure-store-allocation-settings branch July 29, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement serverless-linked Added by automation, don't add manually Team:Distributed Coordination (obsolete) Meta label for Distributed Coordination team. Obsolete. Please do not use. v9.1.1 v9.2.0

4 participants