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

[tiered-storage] set s3 offloader use Virtual Hosted-Style as default #15893

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

Conversation

ethqunzhong
Copy link
Contributor

@ethqunzhong ethqunzhong commented Jun 2, 2022

Motivation

This PR #15710 provides a common way to offload data to storages which compatible with S3 APIs.
I have a test on Tencent Cloud COS (a cloud storage which compatible with S3 APIs),but offload failed.
error messages as below:

a.util.concurrent.CompletionException: org.jclouds.aws.AWSResponseException: request POST https://xxxxx.ap-guangzhou.tencentcos.cn/xxxx-xx-xxxxx/a476b173-a354-480c-9ac2-a81cd11a15ae-ledger-1064936?uploads HTTP/1.1 failed with code 400, error: AWSError{requestId='xxxxxxx', requestToken='null', code='InvalidURI', message='Could not parse the specified URI.', context='{Resource=xxxxx.ap-guangzhou.tencentcos.cn, TraceId=xxxxxxxxxxx}'}

because tencent cloud cos is use Virtual Hosted-Style as default for security reason and network performance, this is probably a reasonably good use way to set PROPERTY_S3_VIRTUAL_HOST_BUCKETS=true such as in #15860

In latest AWS S3 userguide,Virtual Hosted-Style is more recommended.

otherwise,aliyun oss & tencent cos are compatible with S3 APIs. so we could simply this implementation. add a new Offload-Driver name "s3-compatible-storage" to offload data into all these s3-compatible-storages.

Modifications

  1. set pure S3 offload provider use Virtual Hosted-Style as default
  2. simply and unify add a "s3-compatible-storage" offloader.

Verifying this change

  • had pass test in local
  • had pass test in product env
  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

@github-actions github-actions bot added the doc-required Your PR changes impact docs and you will update later. label Jun 2, 2022
@ethqunzhong ethqunzhong changed the title [tiered-storage] add s3 compatible storage provider for the offloader ### [tiered-storage] add s3 compatible storage provider for the offloader Jun 2, 2022
Copy link
Member

@zymap zymap left a comment

Choose a reason for hiding this comment

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

We could change all the jclouds properties by the environment variable or the properties. Adding by this https://github.com/apache/pulsar/pull/15710/files#diff-5fa8cee1e48758e8c2ace441539e0fd696aef158af2da84341532c3e492efc61R333. So the S3 should be a more general way for all the S3-compatible storage service.

@ethqunzhong ethqunzhong force-pushed the s3-compatible-storage-provider-offloader branch from 0f31efb to e7b2f23 Compare June 6, 2022 12:48
@ethqunzhong ethqunzhong force-pushed the s3-compatible-storage-provider-offloader branch from e7b2f23 to 4730c94 Compare June 6, 2022 12:50
@ethqunzhong
Copy link
Contributor Author

We could change all the jclouds properties by the environment variable or the properties. Adding by this https://github.com/apache/pulsar/pull/15710/files#diff-5fa8cee1e48758e8c2ace441539e0fd696aef158af2da84341532c3e492efc61R333. So the S3 should be a more general way for all the S3-compatible storage service.

i think set this value true as default is more user-friendly and recommanded from the guide of latest AWS S3 userguide says.

@ethqunzhong ethqunzhong changed the title [tiered-storage] add s3 compatible storage provider for the offloader [tiered-storage] set s3 offloader use Virtual Hosted-Style as default Jun 6, 2022
@ethqunzhong ethqunzhong requested a review from zymap June 9, 2022 02:40
@github-actions github-actions bot added doc-not-needed Your PR changes do not impact docs and removed doc-required Your PR changes impact docs and you will update later. labels Jun 30, 2022
@ethqunzhong
Copy link
Contributor Author

@hangc0276 PTAL

@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

@github-actions github-actions bot added the Stale label Jul 31, 2022
Copy link
Contributor

@liangyuanpeng liangyuanpeng left a comment

Choose a reason for hiding this comment

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

Sorry about that -1, I think add the doc for use virtual Hosted-Style would be great.

@Technoboy- Technoboy- added this to the 3.2.0 milestone Jul 31, 2023
@Technoboy- Technoboy- modified the milestones: 3.2.0, 3.3.0 Dec 22, 2023
@coderzc coderzc modified the milestones: 3.3.0, 3.4.0 May 8, 2024
@lhotari lhotari modified the milestones: 4.0.0, 4.1.0 Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants