Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listIncompleteUpload Method doesn't work as expected #1165

Closed
RitikRajSrivastava opened this issue Mar 2, 2021 · 6 comments
Closed

listIncompleteUpload Method doesn't work as expected #1165

RitikRajSrivastava opened this issue Mar 2, 2021 · 6 comments

Comments

@RitikRajSrivastava
Copy link

listMultipartUpload doesn't work as explained here : https://docs.min.io/docs/java-client-api-reference.html#listIncompleteUploads

Expected Behavior

listMultipartUpload must be able to list the multipart upload for objects.

Current Behavior

listMultipartUpload method always return an empty list .

Possible Solution

Steps to Reproduce (for bugs)

1.Upload a 200MB object to minio.
2. Abort the upload.
3. list the incomplete Upload by using the listMultipartUpload method of minio sdk
4.

Context

Regression

Your Environment

  • Version used (minio --version): RELEASE.2021-02-19T04-38-02Z
  • Server setup and configuration: 4 server with 4 disks
  • Operating System and version (uname -a): Linux itom-di-minio-0 3.10.0-957.1.3.el7.x86_64
@vadmeste vadmeste transferred this issue from minio/minio Mar 2, 2021
@balamurugana
Copy link
Member

@RitikRajSrivastava Reopen this issue with below information

  1. Make sure you are using the latest version of minio-java v8.1.0
  2. Provide a code causes the issue
  3. Enable traceOn() and provide the output.

@balamurugana
Copy link
Member

Refer #1166

@RitikRajSrivastava
Copy link
Author

RitikRajSrivastava commented Mar 2, 2021

Hi @balamurugana , Thanks for the response.
Yes we are using minio-java 8.1.0 only.
Snippet to reproduce the issue :
Upload Object :
ObjectWriteResponse objectWriteResponse = minioClient.uploadObject(
(UploadObjectArgs.builder()
.bucket(bucketName)).object(file.getName()).
filename(file.getCanonicalPath()).
contentType("application/csv").region("us-east-1").
build());

listIncompleteUploads:

public class listIncomplete extends MinioClient{
public listIncomplete(MinioClient client) {
super(client);
}

public static void main(String args[]) throws
        IOException, InvalidKeyException, NoSuchAlgorithmException,
        InsufficientDataException, ServerException, InternalException,
        XmlParserException, InvalidResponseException, ErrorResponseException {


 listIncomplete listIncomplete = new listIncomplete(buildMinIOClient());

            ListMultipartUploadsResponse listMultipartUploadsResponse =
                    listIncomplete.listMultipartUploads("nomperfbucket",
                            "us-east-1", null, "UTF-8",
                            null, null, "1614",
                            null, null, null);

            ListMultipartUploadsResult result = listMultipartUploadsResponse.result();
            for(Upload upload : result.uploads()){
                System.out.println(upload.objectName());
                System.out.println(upload.uploadId());
            }

}

@balamurugana
Copy link
Member

@RitikRajSrivastava uploadObject() and putObject() never leave incomplete uploads i.e. if case of error, those APIs calls abort multipart upload API.

@RitikRajSrivastava
Copy link
Author

RitikRajSrivastava commented Mar 2, 2021

@balamurugana , thanks .. But what I am seeing , there are folders inside multipart folder which are not getting cleaned up.
As when i am listing incompleteUploads i am getting empty list , How could I clean those residue folder under multipart folder.

@balamurugana
Copy link
Member

Join to minio slack and get discussed about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants