HDDS-14759. Local Empty file is written and retained even when key write fails#10707
Conversation
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @anuragp010 for the patch.
sarvekshayr
left a comment
There was a problem hiding this comment.
Thanks @anuragp010 for the fix.
Please address the minor nits in test class.
|
Thanks @adoroszlai and @sarvekshayr for the review comments, I have addressed them. |
sarvekshayr
left a comment
There was a problem hiding this comment.
Thanks for updating the patch. LGTM.
|
Thanks @anuragp010 for the patch and @adoroszlai for the review. |
|
@anuragp010 Please share text as text, not screenshots. Plain text makes it easier to
It also reduces size to be stored by GitHub. Sharing code can be even better by using permalink URLs. |
I understand. Will do. Thanks @adoroszlai. |
What changes were proposed in this pull request?
The current behaviour of
ozone sh key get /path/to/key localFilewhen reading from the key fails with an IOException or RuntimeException, results in an empty file,localFile, being created. This file doesn't contain any data and can be deleted.This PR ensures the empty file created in the above scenario is deleted.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14759
How was this patch tested?
Made with Claude Code.
Newly added Unit Tests.
Functional Validation:
Success Scenario:

Failure Scenario:
