HDDS-16135. Fix remaining intermittent failures in TestKeyLifecycleService - #11202
Open
shuan1026 wants to merge 1 commit into
Open
HDDS-16135. Fix remaining intermittent failures in TestKeyLifecycleService#11202shuan1026 wants to merge 1 commit into
shuan1026 wants to merge 1 commit into
Conversation
shuan1026
marked this pull request as ready for review
September 4, 2026 14:26
chihsuan
approved these changes
Sep 5, 2026
chihsuan
left a comment
Contributor
There was a problem hiding this comment.
Thanks @shuan1026 +1 LGTM
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes were proposed in this pull request?
HDDS-16135 reported intermittent failures in
TestKeyLifecycleService$Normal#testNestedFSODirectoryScanResume. After HDDS-16033 / #11145 resolve the most of the issues, that method is stable. The full$Normalclass still flakes in two other methods.testScanStatePiggybackedOnDeleteThe test reads
OmLifecycleScanStateonce and assertsscanEndTime != null. After the first scan finishes, the lifecycle policy is still present, the next tick recreates the row withscanEndTime = null(a ~40ms window). The one-shot read can land in that window.This change waits with
GenericTestUtils.waitForuntil a completed scan state is visible.testMultipleDirectoriesMatchedThe test renames a directory to refresh mtime and immediately unparks the scan.
getSubDirectory()merges the dirTable cache with the RocksDB iterator and does not dedupe live entries, so the same directory can be evaluated twice: the cache copy and the DB copy. The stale copy still looks expired, so a just-renewed directory is deleted andwaitFor(deletedDirectory == expected)never settles.This change calls
awaitDirCacheDrainedafter the rename.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-16135
How was this patch tested?
Before:
TestKeyLifecycleService$Normal#ALL(20x10 ALL) Failhttps://github.com/shuan1026/ozone/actions/runs/33775402686
After:
TestKeyLifecycleService$Normal#ALL(20x10 ALL) Passhttps://github.com/shuan1026/ozone/actions/runs/33849488601
Full CI:
https://github.com/shuan1026/ozone/actions/runs/33849024847