-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Effort to fix testDataStreamLifecycleDownsampleRollingRestart
#123769
#125478
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a969ed0
Use a cluster state listener to detect the downsampling status to avo…
gmarouli 0caf4dd
Reduce the amount of docs we are indexing to avoid flakiness
gmarouli 38c1882
Bring the timeouts closer to the original
gmarouli 4377b72
Increase the timeout when waiting for the downsampling to start
gmarouli 091c227
Overload `safeGet` and `safeAwait` to also accept timeouts
gmarouli 403b310
Merge branch 'main' into test-fix-123769
gmarouli e6504e2
Merge with main
gmarouli 77ed7ff
Make the status check stricter
gmarouli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do you know why we need so many docs in the first place? Is the reason purely that we want the downsample operation to take some time so we have a chance to disrupt the cluster during the downsampling? If so, I feel like a more targeted approach would be better. For instance, we could delay some actions by intercepting them - that's a fairly common practice in internal cluster tests. It's going to require some more complexity, but I think it'll have a higher value as we'll be more in control of when the disruption happens. What do you think?
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.
I am not sure about that. Reducing the amount of indexed documents very much and accessing internal state to determine when to introduce the disruption can also reduce the value of the test because it becomes more staged.
On the other hand, I do not know what is the lowest count that makes sense in this test and if there is an internal task or something that we could leverage to better position the rolling restart. That is why this PR is on the conservative side. But I can follow up on it and see where it goes.
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.
You mentioned that you ran the test locally to check which doc counts still caused the disruption to happen. Do we have an idea of whether the disruption even happens in CI - with the 50k docs and the 25k docs? Because the test also handles the situation where the downsampling already completed before we start the disruption, I feel we have no proof that the test actually tests what it's supposed to do.
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.
Kind of, I sampled it but this does not guarantee that it will always be like that. I checked if the status after the disruption was
started
at least once.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.
Did you check on CI as well? If it runs - based on timing - on our laptops in a certain way, it doesn't prove it runs on CI in the same way.
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.
No I haven't checked it because I do not know how, as far as I know we do not have test logs from successful builds. So unless I make it fail I do not know how to get that data. How would you test it?
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 only way I can think of is to change the test to change the first
ensureDownsamplingStatus
to only expect thestarted
status. That will cause the test to fail if the downsampling already completed (which makes the test worthless).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.
Done, we can monitor if it starts failing now with this assertion and evaluate how to change the test. I will keep an eye on it.