Skip to content

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

Draft
sadanand48 wants to merge 1 commit intoapache:masterfrom
sadanand48:HDDS-14654
Draft

HDDS-14654. NoSuchFileException when orphan check runs after purged snapshot YAML is deleted.#9786
sadanand48 wants to merge 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
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.

1 participant

Comments