Skip to content

Add Downsample Action to unfollow injection logic #128788

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 3 commits into
base: main
Choose a base branch
from

Conversation

Anirudh2112
Copy link

@Anirudh2112 Anirudh2112 commented Jun 2, 2025

Add DownsampleAction to unfollow injection logic

Problem

When using DownsampleAction in ILM policies on follower indices in Cross-Cluster Replication (CCR) setups, the automatic unfollow step was not being injected. This could lead to issues where the follower index attempts downsampling while still following a leader index, potentially causing replication conflicts.

Solution

Added DownsampleAction to the list of actions that trigger unfollow step injection in TimeseriesLifecycleType.shouldInjectUnfollowStep(), maintaining consistency with other data-transforming actions like RolloverAction, ShrinkAction, and SearchableSnapshotAction. Also added corresponding test cases to verify the new behavior.

DownsampleAction performs index transformation by reducing time series data resolution, which modifies index structure in ways that are incompatible with CCR following, hence requiring the unfollow step.

Checklist

  • Signed the contributor license agreement
  • Followed the contributor guidelines
  • Built formula locally with targeted tests (full build encounters Windows BWC path length limitations)
  • Pull request is against main branch
  • Code is for supported OS (Windows 11)
  • Not for a class assignment

Fixes #128128

@elasticsearchmachine elasticsearchmachine added v9.1.0 external-contributor Pull request authored by a developer outside the Elasticsearch team needs:triage Requires assignment of a team area label labels Jun 2, 2025
@nielsbauman nielsbauman added :Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team >bug and removed needs:triage Requires assignment of a team area label labels Jun 4, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

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

@nielsbauman nielsbauman self-assigned this Jun 4, 2025
@nielsbauman nielsbauman self-requested a review June 4, 2025 10:19
@nielsbauman
Copy link
Contributor

buildkite test this

@nielsbauman
Copy link
Contributor

buildkite test this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/ILM+SLM Index and Snapshot lifecycle management external-contributor Pull request authored by a developer outside the Elasticsearch team :StorageEngine/TSDB You know, for Metrics Team:Data Management Meta label for data/management team Team:StorageEngine v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ILM & TSDS] Inject an unfollow action before executing a downsample action.
3 participants