Soumitra Sulav created HDDS-14759:
-------------------------------------

             Summary: Local Empty file is written and retained even when key 
write fails.
                 Key: HDDS-14759
                 URL: https://issues.apache.org/jira/browse/HDDS-14759
             Project: Apache Ozone
          Issue Type: Bug
          Components: Ozone CLI
    Affects Versions: 2.1.0
            Reporter: Soumitra Sulav


The empty file is written and retained even when write fails.

As a result the next GET gives file already exists error.

Expected: On failed write, empty file should be cleaned up.
{code:java}
# ozone sh key get vol-scmfail-k7k14/buck-scmfail-k7k14/key_5mb_ec_1 
download_key_5mb_ec_10
There are insufficient datanodes to read the EC block
# ls -l download_key_5mb_ec_10
-rw-r--r-- 1 root root       0 Mar  3 07:11 download_key_5mb_ec_10
# ozone sh key get vol-scmfail-k7k14/buck-scmfail-k7k14/key_5mb_ec_1 
download_key_5mb_ec_10
download_key_5mb_ec_10 exists. Download would overwrite an existing file. 
Aborting.{code}
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to