[ 
https://issues.apache.org/jira/browse/HDDS-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shashikant Banerjee updated HDDS-1373:
--------------------------------------
       Resolution: Fixed
    Fix Version/s: 0.5.0
           Status: Resolved  (was: Patch Available)

Thanks [~msingh] and [~jnp] for the review. I have committed this change to 
trunk.

> KeyOutputStream, close after write request fails after retries, runs into 
> IllegalArgumentException
> --------------------------------------------------------------------------------------------------
>
>                 Key: HDDS-1373
>                 URL: https://issues.apache.org/jira/browse/HDDS-1373
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Client
>    Affects Versions: 0.4.0, 0.5.0
>            Reporter: Mukul Kumar Singh
>            Assignee: Shashikant Banerjee
>            Priority: Major
>              Labels: MiniOzoneChaosCluster, pull-request-available
>             Fix For: 0.5.0
>
>         Attachments: HDDS-1373.000.patch, HDDS-1373.001.patch
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> In this code, the stream is closed via try with resource.
> {code}
>       try (OzoneOutputStream stream = ozoneBucket.createKey(keyName,
>           bufferCapacity, ReplicationType.RATIS, ReplicationFactor.THREE,
>           new HashMap<>())) {
>         stream.write(buffer.array());
>       } catch (Exception e) {
>         LOG.error("LOADGEN: Create key:{} failed with exception", keyName, e);
>         break;
>       }
> {code}
> Here, the write call fails correctly as expected, However the close doesn't 
> fail with the same exception.
> The exception stack stack is as following
> {code}
> 2019-04-03 00:52:54,116 ERROR ozone.MiniOzoneLoadGenerator 
> (MiniOzoneLoadGenerator.java:load(101)) - LOADGEN: Create 
> key:pool-431-thread-9-81262222 failed with exception
> java.io.IOException: Retry request failed. retries get failed due to exceeded 
> maximum allowed retries number: 5
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:492)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:514)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:514)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:514)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:514)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleRetry(KeyOutputStream.java:514)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleException(KeyOutputStream.java:468)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.handleWrite(KeyOutputStream.java:344)
>         at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.write(KeyOutputStream.java:287)
>         at 
> org.apache.hadoop.ozone.client.io.OzoneOutputStream.write(OzoneOutputStream.java:49)
>         at java.io.OutputStream.write(OutputStream.java:75)
>         at 
> org.apache.hadoop.ozone.MiniOzoneLoadGenerator.load(MiniOzoneLoadGenerator.java:99)
>         at 
> org.apache.hadoop.ozone.MiniOzoneLoadGenerator.lambda$startIO$0(MiniOzoneLoadGenerator.java:137)
>         at 
> java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
>         Suppressed: java.lang.IllegalArgumentException
>                 at 
> com.google.common.base.Preconditions.checkArgument(Preconditions.java:72)
>                 at 
> org.apache.hadoop.ozone.client.io.KeyOutputStream.close(KeyOutputStream.java:643)
>                 at 
> org.apache.hadoop.ozone.client.io.OzoneOutputStream.close(OzoneOutputStream.java:60)
>                 at 
> org.apache.hadoop.ozone.MiniOzoneLoadGenerator.load(MiniOzoneLoadGenerator.java:100)
>                 ... 5 more
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to