Skip to content

HDDS-15828. Fix flaky TestDirectoryDeletingServiceWithFSO snapshot cleanup.#10726

Open
jojochuang wants to merge 1 commit into
apache:masterfrom
jojochuang:HDDS-15828
Open

HDDS-15828. Fix flaky TestDirectoryDeletingServiceWithFSO snapshot cleanup.#10726
jojochuang wants to merge 1 commit into
apache:masterfrom
jojochuang:HDDS-15828

Conversation

@jojochuang

Copy link
Copy Markdown
Contributor

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

…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
Copilot AI review requested due to automatic review settings July 11, 2026 01:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 for snapshotInfoTable to 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants