[ 
https://issues.apache.org/jira/browse/HDDS-9526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17779149#comment-17779149
 ] 

ChenXi commented on HDDS-9526:
------------------------------

One of the simplest fixes is to have S3G not perform a commit operation when it 
writes a key exception (we can perform a CleanOpenKey operation)
public class ObjectEndpoint extends EndpointBase {//...  public Response put() 
{//...   try {//...      long putLength = IOUtils.copyLarge(body, output);  // 
TimeoutException or other Exception//...    } finally {
      if (exception) {
        cleanOpenKey()
      } else (output ! = null) \{
        output.close();
      }
  }
}

> Two S3G instances writing the same key may cause data loss in case of an 
> exception.
> -----------------------------------------------------------------------------------
>
>                 Key: HDDS-9526
>                 URL: https://issues.apache.org/jira/browse/HDDS-9526
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: ChenXi
>            Assignee: ChenXi
>            Priority: Critical
>         Attachments: image-2023-10-24-23-20-23-399.png
>
>




--
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