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

refactor removeObjects #809

Closed
wants to merge 1 commit into from

Conversation

KevinSmile
Copy link
Contributor

refactor removeObjects (batch remove)

Issue to solve:
MinioClient.removeObjects() is kind of strange and of low efficiency.

public Iterable<Result<DeleteError>> removeObjects(final String bucketName, final Iterable<String> objectNames) {

Details:

1. strange usage of Iterable
MinioClient.removeObjects() returns an Iterable.
This method is doing a DELETE job, but the actual delete job won't execute if you don't iterate over the returned Iterable-value (which will call

private synchronized void populate() {
).
(Call MinioClient.removeObjects() alone deletes nothing, which is strange).

2. improve generating batchDelete-objectList with java8-stream
(default batchSize is 1000)

@KevinSmile KevinSmile force-pushed the refactor-removeObjects branch 2 times, most recently from 3b6db0b to dea9335 Compare November 6, 2019 12:05
@KevinSmile
Copy link
Contributor Author

close it as discussed in #810

@KevinSmile KevinSmile closed this Nov 7, 2019
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

Successfully merging this pull request may close these issues.

1 participant