Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

Rather than computing a map of all relevant snapshots (per repo and
policy) repeatedly, once for every snapshot, let's compute them all up
front.

Rather than computing a map of all relevant snapshots (per repo and
policy) repeatedly, once for every snapshot, let's compute them all up
front.
@DaveCTurner DaveCTurner added >non-issue :Data Management/ILM+SLM Index and Snapshot lifecycle management v8.11.0 labels Sep 29, 2023
@elasticsearchmachine
Copy link
Collaborator

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

@DaveCTurner
Copy link
Contributor Author

@elasticmachine please run elasticsearch-ci/part-2

static boolean snapshotEligibleForDeletion(
SnapshotInfo snapshot,
Map<String, List<SnapshotInfo>> allSnapshots,
Map<String, Map<String, Map<SnapshotId, RepositoryData.SnapshotDetails>>> allSnapshotDetails,
Copy link
Contributor

Choose a reason for hiding this comment

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

You're straining the very definition of data structures here, David. 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If this was Haskell they'd be type synonyms.

Copy link
Contributor

@joegallo joegallo left a comment

Choose a reason for hiding this comment

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

+1, I'm a bit +-0 on the (internal only) mutability of the map of maps of maps, but I'm willing to go along for the ride on this and some follow up PRs and revisit this when the dust settles.

@DaveCTurner DaveCTurner merged commit 675c2c8 into elastic:main Sep 29, 2023
@DaveCTurner DaveCTurner deleted the 2023/09/29/SnapshotRetentionTask-snapshot-maps-up-front branch September 29, 2023 17:25
piergm pushed a commit to piergm/elasticsearch that referenced this pull request Oct 2, 2023
Rather than computing a map of all relevant snapshots (per repo and
policy) repeatedly, once for every snapshot, let's compute them all up
front.
jakelandis pushed a commit to jakelandis/elasticsearch that referenced this pull request Oct 2, 2023
Rather than computing a map of all relevant snapshots (per repo and
policy) repeatedly, once for every snapshot, let's compute them all up
front.
@DaveCTurner DaveCTurner restored the 2023/09/29/SnapshotRetentionTask-snapshot-maps-up-front 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 >non-issue 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.

3 participants