Skip to content

Move SLM eligibility check#100044

Merged
DaveCTurner merged 1 commit intoelastic:mainfrom
DaveCTurner:2023/09/29/slm-snapshot-move-eligibility-check
Sep 29, 2023
Merged

Move SLM eligibility check#100044
DaveCTurner merged 1 commit intoelastic:mainfrom
DaveCTurner:2023/09/29/slm-snapshot-move-eligibility-check

Conversation

@DaveCTurner
Copy link
Copy Markdown
Member

A small refactoring to make #99953 a little simpler: combine the logic
for retrieving the snapshot info and filtering out the ineligible ones
into a single function so we can replace it with a call to a dedicated
client action in a followup.

A small refactoring to make elastic#99953 a little simpler: combine the logic
for retrieving the snapshot info and filtering out the ineligible ones
into a single function so we can replace it with a call to a dedicated
client action in a followup.
@DaveCTurner DaveCTurner added >refactoring :Data Management/ILM+SLM DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. v8.11.0 labels Sep 29, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Sep 29, 2023
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Copy link
Copy Markdown
Contributor

@andreidan andreidan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for doing this refactoring David

Comment on lines +300 to +301
// SnapshotInfo instances can be quite large in case they contain e.g. a large collection of
// exceptions so we extract the only two things (id + policy id) here so they can be GCed
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

++ very nice, thanks explaining the why behind it

Should we consider adding support for this kind of filtering at the API level? (perhaps a fields query parameter that specifies only the fields we want in the response?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This comment was moved as-is from the previous code :)

We're going to fix this properly in follow-ups, but there's basically no reasonable way to use the get-snapshots API here so we'll do something else.

Copy link
Copy Markdown
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM 2

@DaveCTurner DaveCTurner merged commit e23fd32 into elastic:main Sep 29, 2023
@DaveCTurner DaveCTurner deleted the 2023/09/29/slm-snapshot-move-eligibility-check branch September 29, 2023 08:47
piergm pushed a commit to piergm/elasticsearch that referenced this pull request Oct 2, 2023
A small refactoring to make elastic#99953 a little simpler: combine the logic
for retrieving the snapshot info and filtering out the ineligible ones
into a single function so we can replace it with a call to a dedicated
client action in a followup.
jakelandis pushed a commit to jakelandis/elasticsearch that referenced this pull request Oct 2, 2023
A small refactoring to make elastic#99953 a little simpler: combine the logic
for retrieving the snapshot info and filtering out the ineligible ones
into a single function so we can replace it with a call to a dedicated
client action in a followup.
@DaveCTurner DaveCTurner restored the 2023/09/29/slm-snapshot-move-eligibility-check branch June 17, 2024 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/ILM+SLM DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. >refactoring Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v8.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants