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

Vijay Panghal edited comment on JCLOUDS-1176 at 9/13/16 5:16 PM:
-----------------------------------------------------------------

One more observation -
When debug mode is enabled, we are not observing this IOException. 

What I can understand from code, before this patch  we were buffering the error 
message in jclouds-core and then Openstack swift error handler used to read and 
close the underlying connection. But after this patch jclouds-core is not 
buffering the error response but Openstack swift error handler is trying to 
read and close the connection and that causes this IOException.

This also explain how it is working in debug mode. As jcloud-core is buffering 
the error message for logging purpose and openstack swift error handler is able 
to read the error response and close the connection.



was (Author: vpanghal):
One more observations -
When debug mode is enabled, we are not observing this IOException. 

What I can understand from code, before this patch  we were buffering the error 
message in jclouds-core and then Openstack swift error handler used to read and 
close the underlying connection. But after this patch jclouds-core is not 
buffering the error response but Openstack swift error handler is trying to 
read and close the connection and that causes this IOException.

This also explain how it is working in debug mode. As jcloud-core is buffering 
the error message for logging purpose and openstack swift error handler is able 
to read the error response and close the connection.


> Swift delete operation is not idempotent
> ----------------------------------------
>
>                 Key: JCLOUDS-1176
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1176
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore
>    Affects Versions: 1.9.0, 1.9.1, 1.9.2
>            Reporter: Vijay Panghal
>            Assignee: Zack Shoylev
>              Labels: openstack-swift
>
> Openstack Swift delete operation used to be idempotent. But after this pull 
> request https://github.com/jclouds/jclouds/pull/700
> second delete is failing with these stack trace
>  {quote}
> org.jclouds.http.HttpResponseException: java.io.IOException: stream is closed 
> connecting to DELETE 
> https://dal05.objectstorage.softlayer.net/v1/AUTH_0eb7ef10-6761-4384-ab47-9187592f30b1/cloud-testing/74f346838a7b550f
>  HTTP/1.1
>       at 
> org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:114)
>       at 
> org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
>       at 
> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
>       at 
> org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
>       at 
> org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)
>       at 
> org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)
>       at com.sun.proxy.$Proxy67.removeObject(Unknown Source)
>       at 
> org.jclouds.openstack.swift.blobstore.SwiftBlobStore.removeBlob(SwiftBlobStore.java:260)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:497)
>       at 
> com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
>       at com.sun.proxy.$Proxy69.removeBlob(Unknown Source)
>       at 
> com.maginatics.raptor.data.BlobStoreTest.testBlobRemoveIdempotence(BlobStoreTest.java:208)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:497)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>       at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>       at 
> org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
>       at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>       at 
> org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:393)
>       at 
> org.apache.maven.surefire.junitcore.pc.InvokerStrategy.schedule(InvokerStrategy.java:54)
>       at 
> org.apache.maven.surefire.junitcore.pc.Scheduler.schedule(Scheduler.java:352)
>       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>       at org.junit.runners.Suite.runChild(Suite.java:128)
>       at org.junit.runners.Suite.runChild(Suite.java:27)
>       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>       at 
> org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:393)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.RuntimeException: java.io.IOException: stream is closed
>       at com.google.common.base.Throwables.propagate(Throwables.java:160)
>       at org.jclouds.http.HttpUtils.toByteArrayOrNull(HttpUtils.java:127)
>       at 
> org.jclouds.http.HttpUtils.closeClientButKeepContentStream(HttpUtils.java:159)
>       at 
> org.jclouds.openstack.swift.handlers.ParseSwiftErrorFromHttpResponse.handleError(ParseSwiftErrorFromHttpResponse.java:49)
>       at 
> org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)
>       at 
> org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:132)
>       at 
> org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:101)
>       ... 46 more
> Caused by: java.io.IOException: stream is closed
>       at 
> sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.ensureOpen(HttpURLConnection.java:3308)
>       at 
> sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3333)
>       at 
> sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3328)
>       at com.google.common.io.ByteStreams.copy(ByteStreams.java:110)
>       at com.google.common.io.ByteStreams.toByteArray(ByteStreams.java:168)
>       at org.jclouds.http.HttpUtils.toByteArrayOrNull(HttpUtils.java:125)
>       ... 51 more
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to