Skip to content

[ILM]: Fix TSDS unfollow timing with WaitUntilTimeSeriesEndTimePassesStep #128361

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

happysubin
Copy link

fix: #128129

I added the WaitUntilTimeSeriesEndTimePassesStep between the WaitForFollowShardTasksStep and the PauseFollowerIndexStep in the step list of UnFollowAction, and updated the tests accordingly.

Please review my code!

Copy link

cla-checker-service bot commented May 23, 2025

💚 CLA has been signed

@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label external-contributor Pull request authored by a developer outside the Elasticsearch team v9.1.0 labels May 23, 2025
@happysubin happysubin closed this May 23, 2025
@happysubin happysubin reopened this May 23, 2025
@happysubin
Copy link
Author

Hi, @gmarouli
Could you take a look at this PR when you get a moment? I’d really appreciate your review!

@gmarouli
Copy link
Contributor

Hi @happysubin , thank you for your contribution, @samxbr and I will review it as soon as possible.

@gmarouli gmarouli added :Data Management/ILM+SLM Index and Snapshot lifecycle management :StorageEngine/TSDB You know, for Metrics >bug and removed needs:triage Requires assignment of a team area label labels May 27, 2025
@elasticsearchmachine elasticsearchmachine added Team:Data Management Meta label for data/management team Team:StorageEngine labels May 27, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

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

@gmarouli gmarouli requested a review from samxbr May 28, 2025 13:39
Copy link
Contributor

@samxbr samxbr left a comment

Choose a reason for hiding this comment

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

@happysubin Thank you for contributing to Elasticsearch! We value external contributions and would love to work with you to get this PR merged. I have left some comments on the PR, please feel free to take your time to address them.

Comment on lines 65 to 74
WaitForFollowShardTasksStep step2 = new WaitForFollowShardTasksStep(
waitForFollowShardTasks,
waitUntilTimeSeriesEndTimePassesStep,
client
);
WaitUntilTimeSeriesEndTimePassesStep step3 = new WaitUntilTimeSeriesEndTimePassesStep(
waitUntilTimeSeriesEndTimePassesStep,
pauseFollowerIndex,
Instant::now
);
Copy link
Contributor

Choose a reason for hiding this comment

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

The WaitUntilTimeSeriesEndTimePassesStep should be prior to WaitForFollowShardTasksStep, because the follower index can sync with the leader index one last time after the end_time has passed, to make sure there's no new docs coming in to the leader index.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add new integration test in the CCRIndexLifecycleIT test suite to cover this scenario. You can refer to this test as an example for verifying the WaitUntilTimeSeriesEndTimePassesStep. Essentially we would want to verify that after leader index rollovers, the follower index goes into the WaitUntilTimeSeriesEndTimePassesStep, and new documents to the leader index are synced to the follower index until end_time has passed.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the code review.
I'll review the existing test cases and work on adding new ones.I'm going to add test code!

@samxbr
Copy link
Contributor

samxbr commented May 30, 2025

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] ILM needs to wait for end_time before it "unfollows"
4 participants