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

Add injection of custom executor service to S3Base supplyAsync calls #1543

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

delta11
Copy link

@delta11 delta11 commented Mar 18, 2024

We have a use case where we need to provide our own thread pool for the CompletableFuture.supplyAsync to run on, currently that's not possible and it's preventing us from keeping up with library upgrades.

@chenshi5012
Copy link

@delta11 refer #1569

can you give some advice about this issue.

@delta11
Copy link
Author

delta11 commented Jun 21, 2024

@delta11 refer #1569

can you give some advice about this issue.

Seems like 2 unrelated issues, this one is about giving flexibility to control which executor service get's used not what it get's used for.

@delta11 delta11 requested a review from balamurugana July 8, 2024 05:44
@balamurugana
Copy link
Member

Any custom requirements should be done by inheriting S3Base and override whatever methods you want. I am not sure why we need to take this into minio-java.

@delta11 delta11 force-pushed the add-executor-service-to-builder branch from 74b14cf to a491d99 Compare July 8, 2024 06:55
@delta11
Copy link
Author

delta11 commented Jul 8, 2024

Any custom requirements should be done by inheriting S3Base and override whatever methods you want. I am not sure why we need to take this into minio-java.

We are in an environment where we can't use the regular ForkJoinPool.commonPool() (which CompletableFuture.supplyAsync uses by default).

But in this situation allowing users to optionally supply their own ExecutorService would be preferable over having to override half a dozen rather methods of S3Base and the MinioAsyncClient to change CompletableFuture.supplyAsync(....) into CompletableFuture.supplyAsync(....,executorService).

Though we understand that this is an uncommon requirement, it would still be a great help to us if we can provide our own and I imagine there might be some other niche use cases that would benefit. Let me know what you think!

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.

3 participants