Skip to content

HDDS-14654. NoSuchFileException when orphan check runs after purged snapshot YAML is deleted.#9786

Merged
sadanand48 merged 1 commit intoapache:masterfrom
sadanand48:HDDS-14654
Mar 2, 2026
Merged

HDDS-14654. NoSuchFileException when orphan check runs after purged snapshot YAML is deleted.#9786
sadanand48 merged 1 commit intoapache:masterfrom
sadanand48:HDDS-14654

Conversation

@sadanand48
Copy link
Contributor

What changes were proposed in this pull request?

When a purged snapshot’s YAML is deleted (all versions removed), the orphan check can still schedule that snapshot again.
The next run then tries to load the missing YAML and throws NoSuchFileException.

Root cause:
In checkForOphanVersionsAndIncrementCount, we always call incrementOrphanCheckCount(snapshotId) when isPurgeTransactionSet or the version changes, even if the YAML was just deleted (empty versions). That keeps the snapshot in snapshotToBeCheckedForOrphans even though there is nothing left to check.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-14654

How was this patch tested?

Unit test added

@sadanand48 sadanand48 added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Feb 18, 2026
@SaketaChalamchala
Copy link
Contributor

Thanks @sadanand48 for the patch. LGTM

@aswinshakil aswinshakil marked this pull request as ready for review February 27, 2026 19:21
@sadanand48 sadanand48 merged commit 94a4014 into apache:master Mar 2, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot https://issues.apache.org/jira/browse/HDDS-6517

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants