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

File Shares Sync Stack Upload APIs #41664

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

ibrahimrabab
Copy link
Contributor

Description

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Aug 28, 2024
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

final long blockSize = Math.min(validatedParallelTransferOptions.getBlockSizeLong(), 4L * 1024L * 1024L); // 4 MB
final int maxConcurrency = validatedParallelTransferOptions.getMaxConcurrency();

ExecutorService executor = Executors.newFixedThreadPool(maxConcurrency);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should look into designing this differently, as this will create a new thread pool per API call and will result in many, many Threads being created and torn down. I'd want to look into leveraging SharedExecutorService in azure-core as the thread pool that manages parallelization here, but that generally will have many more threads available than parallelization will be set to, so we'll need to implement some level of rate limiting.

I think we should look initially into limiting the number of calls in parallel by using a Semaphore with a number of permits equal to parallelization (and remembering to release them when that upload chunk is complete).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants