-
Notifications
You must be signed in to change notification settings - Fork 590
HDDS-10143. Fix intermittent failure in testParallelDeleteBucketAndCreateKey #6335
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
Conversation
adoroszlai
left a comment
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 @xichen01 for the patch.
| thread2.start(); | ||
| Thread.sleep(2000); | ||
| // Wait long enough for createKey's preExecute to finish executing | ||
| Thread.sleep(10000); |
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.
Can we change this to waitFor some explicit condition?
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.
Yes, but this needs to modify more codes. We need to know the preExecture has been executed completely, but the preExecture is a prviate method (or we need to add some flag to watch), I don't want ot modify it just for only one testing.
Add sleeping time is a dirty but quick solution. How 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.
Done
adoroszlai
left a comment
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 @xichen01 for updating the patch.
Latest repeated run for reference:
https://github.com/xichen01/ozone/actions/runs/8358073042
…arallelDeleteBucketAndCreateKey (apache#6335)
…arallelDeleteBucketAndCreateKey (apache#6335) (cherry picked from commit f9e5178)
…arallelDeleteBucketAndCreateKey (apache#6335) (cherry picked from commit f9e5178)
What changes were proposed in this pull request?
Fix testParallelDeleteBucketAndCreateKey
The root cause is the
preExecute#resolveBucketAndCheckKeyAclsofCreateKeymay execute afterdeleteBucket, then theCreateKey#preExecutewill throw an exception, so the test will fail. For fix this, we just need to add the waiting time.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10143
How was this patch tested?
Before, lots of failures.
https://github.com/xichen01/ozone/actions/runs/8158284595
After, All successful
https://github.com/xichen01/ozone/actions/runs/8158363756