Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

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 Index and Snapshot lifecycle management v8.11.0 labels Sep 29, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Sep 29, 2023
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
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
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
Contributor 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
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 Index and Snapshot lifecycle management >refactoring Team:Data Management Meta label for data/management team v8.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants