luoyuxia commented on issue #5963:
URL: https://github.com/apache/iceberg/issues/5963#issuecomment-1306482700

   We also meet the same problem, the 1 minute may be a reason, but I'm pretty 
sure it not for my case after a long debuging.
   after apply a patch, the exception won't be reproduced, but I can't figure 
out the reason. Others who meet the same problem may apply the patch and see 
whether it solve the problem.
   ```
   Index: aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSInputStream.java
   IDEA additional info:
   Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
   <+>UTF-8
   ===================================================================
   diff --git 
a/aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSInputStream.java 
b/aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSInputStream.java
   --- a/aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSInputStream.java 
(revision 7d34482e1e5c763bea403d1cffcf7c69ddb06dc4)
   +++ b/aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSInputStream.java 
(revision b02e73c1e2ba0705d8d7d308ddac157861daa2ba)
   @@ -21,6 +21,7 @@
    
    import com.aliyun.oss.OSS;
    import com.aliyun.oss.model.GetObjectRequest;
   +import com.aliyun.oss.model.OSSObject;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Arrays;
   @@ -39,6 +40,7 @@
      private final OSS client;
      private final OSSURI uri;
    
   +  private OSSObject ossObject = null;
      private InputStream stream = null;
      private long pos = 0;
      private long next = 0;
   @@ -128,7 +130,12 @@
    
        GetObjectRequest request = new GetObjectRequest(uri.bucket(), uri.key())
            .withRange(pos, -1);
   -    stream = client.getObject(request).getObjectContent();
   +
   +    ossObject = client.getObject(request);
   +    LOG.debug("OSS GetObject with uri={}, startPos={}, endPos={}, 
requestId={}", uri, pos, -1,
   +        ossObject.getRequestId());
   +
   +    stream = ossObject.getObjectContent();
      }
    
      private void closeStream() throws IOException {
   Index: 
aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSOutputStream.java
   IDEA additional info:
   Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
   <+>UTF-8
   ===================================================================
   diff --git 
a/aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSOutputStream.java 
b/aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSOutputStream.java
   --- 
a/aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSOutputStream.java       
 (revision 7d34482e1e5c763bea403d1cffcf7c69ddb06dc4)
   +++ 
b/aliyun/src/main/java/org/apache/iceberg/aliyun/oss/OSSOutputStream.java       
 (revision b02e73c1e2ba0705d8d7d308ddac157861daa2ba)
   @@ -27,6 +27,7 @@
    import com.aliyun.oss.model.ObjectMetadata;
    import com.aliyun.oss.model.PartETag;
    import com.aliyun.oss.model.PutObjectRequest;
   +import com.aliyun.oss.model.PutObjectResult;
    import com.aliyun.oss.model.UploadPartRequest;
    import com.aliyun.oss.model.UploadPartResult;
    import java.io.BufferedInputStream;
   @@ -284,7 +285,10 @@
          metadata.setContentLength(contentLength);
    
          PutObjectRequest request = new PutObjectRequest(uri.bucket(), 
uri.key(), contentStream, metadata);
   -      client.putObject(request);
   +      PutObjectResult result = client.putObject(request);
   +
   +      LOG.debug("OSS PutObjectResult with uri={}, contentLength={}, 
requestId={}", uri,
   +          contentLength, result.getRequestId());
        } else {
          uploadParts();
          completeMultiPartUpload();
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to