HDDS-15828. Fix flaky TestDirectoryDeletingServiceWithFSO snapshot cleanup.#10726
Open
jojochuang wants to merge 1 commit into
Open
HDDS-15828. Fix flaky TestDirectoryDeletingServiceWithFSO snapshot cleanup.#10726jojochuang wants to merge 1 commit into
jojochuang wants to merge 1 commit into
Conversation
…eanup. Wait for SnapshotDeletingService to purge deleted snapshots before snapshot tests return on the shared mini-cluster, so later tests do not chain off stale global snapshot entries. Co-authored-by: Cursor <cursoragent@cursor.com> Change-Id: I57ec596cd5870b68f21ff9d9a89850ea9832f56e
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets integration-test flakiness in TestDirectoryDeletingServiceWithFSO by ensuring snapshot deletions are fully purged from OM metadata before tests return, avoiding cross-test interference on the shared mini-cluster.
Changes:
- Replace SnapshotDeletingService shutdown/restart logic with suspend/resume and a dedicated purge-wait helper.
- Add a
waitForSnapshotsPurged(...)helper that drives SnapshotDeletingService and waits forsnapshotInfoTableto reach an expected row count. - Ensure snapshot purge is awaited after snapshot deletion in another test to avoid leaving global snapshot entries behind.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+574
to
577
| cluster.getOzoneManager().getKeyManager().getSnapshotDeletingService().suspend(); | ||
| DirectoryDeletingService dirDeletingService = cluster.getOzoneManager().getKeyManager().getDirDeletingService(); | ||
| // Suspend KeyDeletingService | ||
| dirDeletingService.suspend(); |
Comment on lines
+827
to
+829
| } catch (Exception e) { | ||
| return false; | ||
| } |
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-15828. Fix flaky TestDirectoryDeletingServiceWithFSO snapshot cleanup.
What is the link to the Apache JIRA
Previously failed in https://github.com/apache/ozone/actions/runs/29127546564/job/86477855080
Wait for SnapshotDeletingService to purge deleted snapshots before snapshot tests return on the shared mini-cluster, so later tests do not chain off stale global snapshot entries.
How was this patch tested?
flaky-test-check 10x10 all passed: https://github.com/jojochuang/ozone/actions/runs/29134805647