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

Mukund Thakur commented on HADOOP-18460:
----------------------------------------

{code:java}
/**
 * Get the s3 object for S3 server for a specified range.
 * Also checks if the vectored io operation has been stopped before and after
 * the http get request such that we don't waste time populating the buffers.
 * @param operationName name of the operation for which get object on S3 is 
called.
 * @param position position of the object to be read from S3.
 * @param length length from position of the object to be read from S3.
 * @return result s3 object.
 * @throws IOException exception if any.
 */
private S3Object getS3ObjectAndValidateNotNull(final String operationName,
                                               final long position,
                                               final int length) throws 
IOException {
  checkIfVectoredIOStopped();
  S3Object objectRange = getS3Object(operationName, position, length);
  if (objectRange.getObjectContent() == null) {
    throw new PathIOException(uri,
            "Null IO stream received during " + operationName);
  }
  checkIfVectoredIOStopped();
  return objectRange;
} {code}
We I made this change but while making I think there is one issue in this: 
Suppose we interrupt after getting the stream from S3, we will never be closing 
the S3Object thus leading to memory leak ? 

> ITestS3AContractVectoredRead.testStopVectoredIoOperationsUnbuffer failing
> -------------------------------------------------------------------------
>
>                 Key: HADOOP-18460
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18460
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3, test
>    Affects Versions: 3.4.0
>            Reporter: Steve Loughran
>            Assignee: Mukund Thakur
>            Priority: Major
>
> seeing a test failure in both parallel and single test case runs of 
> {{ITestS3AContractVectoredRead.testStopVectoredIoOperationsUnbuffer))



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