Skip to content

Fix synthetic recovery source version validation.#118924

Merged
martijnvg merged 5 commits intoelastic:mainfrom
martijnvg:sythetic_recovery_source_setting
Dec 18, 2024
Merged

Fix synthetic recovery source version validation.#118924
martijnvg merged 5 commits intoelastic:mainfrom
martijnvg:sythetic_recovery_source_setting

Conversation

@martijnvg
Copy link
Member

@martijnvg martijnvg commented Dec 18, 2024

The validation didn't work as expected, because created version was always 0 (which is created version default value).

Moving the validation to a place that does have access to the index version.

The validation didn't work as expected, because created version was always `0` (which is created version default value).

I think we actually don't need the versioning added in elastic#114618. This is a final setting and only clusters on the version that understand the use_synthetic_source can set it. Looking at this differently, this setting can't be set on indices created with earlier versions of Elasticsearch.
@martijnvg martijnvg added :StorageEngine/Mapping The storage related side of mappings v8.18.0 labels Dec 18, 2024
@martijnvg martijnvg requested a review from jimczi December 18, 2024 09:34
@martijnvg martijnvg added the auto-backport Automatically create backport pull requests when merged label Dec 18, 2024
@martijnvg martijnvg marked this pull request as ready for review December 18, 2024 09:35
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

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

LGTM

RECOVERY_USE_SYNTHETIC_SOURCE_SETTING.getKey()
)
);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also remove SETTING_INDEX_VERSION_CREATED from the settings returned below.

@martijnvg martijnvg enabled auto-merge (squash) December 18, 2024 10:22
@martijnvg martijnvg changed the title Remove synthetic recovery source version validation. Dec 18, 2024
@martijnvg martijnvg merged commit 4974336 into elastic:main Dec 18, 2024
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 118924

martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Dec 18, 2024
The validation didn't work as expected, because created version was always 0 (which is created version default value).

Moving the validation to a place that does have access to the index version.
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Dec 18, 2024
The validation didn't work as expected, because created version was always 0 (which is created version default value).

Moving the validation to a place that does have access to the index version.
elasticsearchmachine pushed a commit that referenced this pull request Dec 18, 2024
* Fix synthetic recovery source version validation. (#118924)

The validation didn't work as expected, because created version was always 0 (which is created version default value).

Moving the validation to a place that does have access to the index version.

* fixed compile error after cherry picking

* iter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >non-issue :StorageEngine/Mapping The storage related side of mappings Team:StorageEngine v8.18.0 v9.0.0

3 participants