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

Allow configurable concurrent uploads #605

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

jvillafanez
Copy link
Member

Ref https://github.com/owncloud/enterprise/issues/5372

The CurlMultiHandler will be used instead of the old StreamHandler in order to support concurrent uploads to the s3 storage. Curl is mandatory, so there is no reason to switch back.

The number of concurrent requests can be adjusted via config.php file:

'objectstore' => [
        'class' => getenv('OWNCLOUD_OBJECTSTORE_CLASS'),
        'arguments' => [
          'bucket' => getenv('OWNCLOUD_OBJECTSTORE_BUCKET'),
          'autocreate' => getenv('OWNCLOUD_OBJECTSTORE_AUTOCREATE'),
          'part_size' => 52428800,
          'concurrency' => 4,   // <---------------
          'options' => [
            'endpoint' => getenv('OWNCLOUD_OBJECTSTORE_ENDPOINT'),
            'version' => getenv('OWNCLOUD_OBJECTSTORE_VERSION'),
            'region' => getenv('OWNCLOUD_OBJECTSTORE_REGION'),
            'use_path_style_endpoint' => getenv('OWNCLOUD_OBJECTSTORE_PATHSTYLE') === 'true',
            'command.params' => [
              'PathStyle' => getenv('OWNCLOUD_OBJECTSTORE_PATHSTYLE') === 'true',
            ],
            'credentials' => [
              'key'   => getenv('OWNCLOUD_OBJECTSTORE_KEY'),
              'secret'  => getenv('OWNCLOUD_OBJECTSTORE_SECRET'),
            ],
          ],
        ],
      ],

If no value is configured, the aws-sdk will choose one (3 requests by default)

To be checked with both guzzle 5 and 7

@CLAassistant
Copy link

CLAassistant commented Sep 19, 2022

CLA assistant check
All committers have signed the CLA.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@jvillafanez jvillafanez merged commit 731df0d into master Sep 20, 2022
@delete-merged-branch delete-merged-branch bot deleted the configurable_concurrent_uploads branch September 20, 2022 10:56
@phil-davis
Copy link
Contributor

@jvillafanez Should this have a release scheduled?
If so, then a release issue is needed, and put it in the Release project.

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

Successfully merging this pull request may close these issues.

4 participants