Skip to content

Make restore support multi-project #131661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ywangd
Copy link
Member

@ywangd ywangd commented Jul 22, 2025

This PR makes the restore process project aware and unmute relevant tests. The later requires TransportRecoveryAction to be project aware which is done in this PR as well.

Relates: #130000

@ywangd ywangd requested review from pxsalehi and DaveCTurner July 22, 2025 05:36
@ywangd ywangd added >non-issue :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v9.2.0 labels Jul 22, 2025
@ywangd ywangd requested a review from a team as a code owner July 22, 2025 05:37
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Coordination Meta label for Distributed Coordination team label Jul 22, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine added the serverless-linked Added by automation, don't add manually label Jul 22, 2025
@ywangd
Copy link
Member Author

ywangd commented Jul 22, 2025

I will be updating tests like SnapshotResiliencyTests and SnapshotStressTestsIT for multi-project in separate PRs. The plan is to first make them work on a single non-default project and eventually across multiple projects.

Comment on lines -380 to +384
params -> Iterators.concat(Iterators.single((builder, ignored) -> builder.field("id", projectMetadata.id())))
params -> Iterators.concat(
Iterators.single((ToXContent) (builder, p) -> builder.field("id", projectMetadata.id())),
projectMetadata.toXContentChunked(params)
)
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixing a silly bug from #130000 ...

Copy link
Member

@pxsalehi pxsalehi left a comment

Choose a reason for hiding this comment

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

It all looks like just passing project ID to me. Am I missing something, is there something else to check for? I do have a couple of small questions.

if (metadata.persistentSettings() != null) {
assert deserializeProjectMetadata == false || metadata.persistentSettings().isEmpty()
Copy link
Member

Choose a reason for hiding this comment

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

should this be (deserializeProjectMetadata == false && projectId.equals(DEFAULT))?

Copy link
Member

Choose a reason for hiding this comment

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

also I assume we're not restoring settings from the metadata for the project since they're not in metadata?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >non-issue serverless-linked Added by automation, don't add manually Team:Distributed Coordination Meta label for Distributed Coordination team v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants