-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix flaky test cases for DiskThresholdDeciderIT #5952
Fix flaky test cases for DiskThresholdDeciderIT #5952
Conversation
561f670
to
a60d924
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
a60d924
to
62db94a
Compare
Gradle Check (Jenkins) Run Completed with:
|
62db94a
to
fdb31f7
Compare
Gradle Check (Jenkins) Run Completed with:
|
fdb31f7
to
e14d9dc
Compare
Gradle Check (Jenkins) Run Completed with:
|
03617e4
to
34e47b6
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
34e47b6
to
9172666
Compare
Gradle Check (Jenkins) Run Completed with:
|
6fc213c
to
0784c8d
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
0784c8d
to
58f5e15
Compare
Gradle Check (Jenkins) Run Completed with:
|
58f5e15
to
7a173e4
Compare
Gradle Check (Jenkins) Run Completed with:
|
f5d79b1
to
55a4ff4
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
4451ab7
to
6cf33f0
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Made few portion of test cases synchronous to make these test cases deterministic. Tested it out with 50 iterations run with no failure. |
Ran the DiskThresholdDeciderIt successfully with 50 iterations on local. |
public void invokeListeners(final ClusterInfo clusterInfo) { | ||
listeners.forEach(listener -> listener.accept(clusterInfo)); | ||
} |
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.
This doesn't quite seem right, architecturally. Being able to manually invoke listeners for an arbitrary ClusterInfo seems like it violates encapsulation. Also the fact that you're maintaining a parallel list of listeners will potentially make this brittle to changes in the behavior of InternalClusterInfoService. Is there no other way to accomplish what you need?
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.
Looks like synchronising refresh function inside InternalClusterInfoService
will not be required as it refreshes the ClusterInfo in a blocking fashion. Simply disabling auto refresh (auto refresh was making test cases flaky) of InternalClusterInfoService
and explicitly calling refresh after index on node is populated fixed the issue for me (Ignore previous errors as I missed disabling auto refresh on cluster manager node). I have validated test cases with more than 50 iterations on local.
Let me know if you see anything else can cause issue.
6cf33f0
to
e288d9e
Compare
Gradle Check (Jenkins) Run Completed with:
|
e288d9e
to
01cd9c2
Compare
Gradle Check (Jenkins) Run Completed with:
|
4c6e3c4
to
639b08e
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
639b08e
to
dc87309
Compare
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Rishav Sagar <rissag@amazon.com>
dc87309
to
a72eea4
Compare
Gradle Check (Jenkins) Run Completed with:
|
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.
Thanks for working through this @RS146BIJAY!
Signed-off-by: Rishav Sagar <rissag@amazon.com> Co-authored-by: Rishav Sagar <rissag@amazon.com> (cherry picked from commit f3ed0d6) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit f3ed0d6) Signed-off-by: Rishav Sagar <rissag@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Rishav Sagar <rissag@amazon.com>
Signed-off-by: Rishav Sagar rissag@amazon.com
Description
Test cases added for guardrail for applying index create block when all nodes are breaching high disk watermark were flaky. Reallocation on index created during integ test run was causing some race conditions scenarios. This PR fixes these test cases by disabling relocation on the indices created during integ tests.
Issues Resolved
#5956
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.