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

docs: update comment about r2 requiring locks #2261

Merged
merged 1 commit into from
Mar 7, 2024

Commits on Mar 7, 2024

  1. docs: update comment about r2 requiring locks

    Cloudflare R2 doesn't require the use of an external lock when using conditional operation headers like so:
    
    ```rust
    let s3 = AmazonS3Builder::from_env()
        .with_url(url)
        .with_region("auto")
        .with_access_key_id(&config.s3_access_key_id)
        .with_secret_access_key(&config.s3_secret_access_key)
        .with_endpoint(&config.s3_endpoint)
        // Allows using S3-API without an external locking provider since Cloudflare R2
        // provides atomic Put and Copy.
        .with_config(
            AmazonS3ConfigKey::CopyIfNotExists,
            "header: cf-copy-destination-if-none-match: *".to_string(),
        )
        .build()
    ```
    
    - https://developers.cloudflare.com/r2/api/s3/extensions/#putobject-1
    - https://github.com/apache/arrow-rs/blob/c6ba0f764a9142b74c9070db269de04d2701d112/object_store/src/aws/precondition.rs#L29-L42
    cmackenzie1 committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    59b5997 View commit details
    Browse the repository at this point in the history