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

Ji Xinchi updated JCLOUDS-1626:
-------------------------------
    Description: 
I'm using gaul/s3proxy built on the latest jclouds. The provider configuration 
is "filesystem", and basedir configuration is a directory where a NFS is 
mounted.

 

When I performed a multipart upload, I found that files such as 
".nfs00000000100000bf00000005" remained in the directory after uploading. Each 
file corresponded to one part and the files could not be deleted. The error 
"Device Busy" was reported. These files will disappear automatically after 
restarting s3proxy.

 

I found this PR, and tried to restore following snippet and it worked. But this 
is just a temporary fix.
         InputStream is = blob.getPayload().openStream();         if (is 
instanceof FileInputStream) {            // except for FileInputStream since 
large MPU can open too many fdsis.close();            payload = 
blob.getPayload();
         } else {            blob.resetPayload(/*release=*/ false);            
payload = new InputStreamPayload(is);
         }

  was:
I'm using gaul/s3proxy built on the latest jclouds. The provider configuration 
is "filesystem", and basedir configuration is a directory where a NFS is 
mounted.

 

When I performed a multipart upload, I found that files such as 
".nfs00000000100000bf00000005" remained in the directory after uploading. Each 
file corresponded to one part and the files could not be deleted. The error 
"Device Busy" was reported. These files will disappear automatically after 
restarting s3proxy.


> `FileInputStream` leak when using `filesystem` provider and performing a 
> multipart upload
> -----------------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-1626
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1626
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore
>            Reporter: Ji Xinchi
>            Priority: Critical
>
> I'm using gaul/s3proxy built on the latest jclouds. The provider 
> configuration is "filesystem", and basedir configuration is a directory where 
> a NFS is mounted.
>  
> When I performed a multipart upload, I found that files such as 
> ".nfs00000000100000bf00000005" remained in the directory after uploading. 
> Each file corresponded to one part and the files could not be deleted. The 
> error "Device Busy" was reported. These files will disappear automatically 
> after restarting s3proxy.
>  
> I found this PR, and tried to restore following snippet and it worked. But 
> this is just a temporary fix.
>          InputStream is = blob.getPayload().openStream();         if (is 
> instanceof FileInputStream) {            // except for FileInputStream since 
> large MPU can open too many fdsis.close();            payload = 
> blob.getPayload();
>          } else {            blob.resetPayload(/*release=*/ false);           
>  payload = new InputStreamPayload(is);
>          }



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to