-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[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
base: main
Are you sure you want to change the base?
Conversation
💚 CLA has been signed |
Hi, @gmarouli |
Hi @happysubin , thank you for your contribution, @samxbr and I will review it as soon as possible. |
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
Pinging @elastic/es-data-management (Team:Data Management) |
There was a problem hiding this 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.
WaitForFollowShardTasksStep step2 = new WaitForFollowShardTasksStep( | ||
waitForFollowShardTasks, | ||
waitUntilTimeSeriesEndTimePassesStep, | ||
client | ||
); | ||
WaitUntilTimeSeriesEndTimePassesStep step3 = new WaitUntilTimeSeriesEndTimePassesStep( | ||
waitUntilTimeSeriesEndTimePassesStep, | ||
pauseFollowerIndex, | ||
Instant::now | ||
); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
buildkite test this |
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!