Skip to content

Comments

HDDS-14652. Handle NoSuchFileException during the bootstrap tarball transfer.#9784

Draft
sadanand48 wants to merge 4 commits intoapache:masterfrom
sadanand48:HDDS-14652
Draft

HDDS-14652. Handle NoSuchFileException during the bootstrap tarball transfer.#9784
sadanand48 wants to merge 4 commits intoapache:masterfrom
sadanand48:HDDS-14652

Conversation

@sadanand48
Copy link
Contributor

What changes were proposed in this pull request?

While transferring the contents from SST backup dir, it can so happen that the DAG Pruner can delete the non-leaf nodes (SST files that are present on the disk) but not remove them from the compaction log.
We iterate the compaction log to get the list of backup sst files to transfer, this can lead to a situation where we are trying to transfer a file cleaned up by the pruner which will throw NoSuchFileException. The bootstrap will fail and retrigger only to be stuck again in a loop.

What is the link to the Apache JIRA

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

How was this patch tested?

will add

@sadanand48 sadanand48 closed this Feb 18, 2026
@sadanand48 sadanand48 reopened this Feb 18, 2026
Sadanand Shenoy added 2 commits February 18, 2026 17:26
@sadanand48
Copy link
Contributor Author

@SaketaChalamchala Could you please take a look?

@jojochuang jojochuang added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label Feb 19, 2026
Files.createLink(link.toPath(), file.toPath());
try {
Files.createLink(link.toPath(), file.toPath());
} catch (NoSuchFileException noSuchFileException) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the patch @sadanand48. Do we want to handle the NoSuchFileException in the framework class? What if this function is called by mutiple processed in the future.
I think we should throw the IOException if the hardlink creation fails and let the caller handle the exception how it wants.

inode = getINode(file);
FileTime mTime = Files.getLastModifiedTime(file);
return String.format("%s-%s", inode, mTime.toMillis());
} catch (NoSuchFileException e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above.
I think instead of handling the error in the util function we should let the caller, in our case the inode based checkpoint servlet handle the exception.

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