Xuanwo commented on code in PR #7890:
URL: https://github.com/apache/opendal/pull/7890#discussion_r3552245775
##########
core/core/src/types/capability.rs:
##########
@@ -118,8 +118,16 @@ pub struct Capability {
/// Indicates if Cache-Control can be specified during write operations.
pub write_with_cache_control: bool,
/// Indicates if conditional write operations using If-Match are supported.
+ ///
+ /// The value passed to `if_match` is normally a literal ETag. GCS is an
exception:
Review Comment:
No, we don't do this. It's very clear that `if-match` accepts an etag.
##########
core/services/gcs/src/backend.rs:
##########
@@ -357,6 +357,8 @@ impl Builder for GcsBuilder {
write_with_content_type: true,
write_with_content_encoding: true,
write_with_user_metadata: true,
+ write_with_if_match: true,
Review Comment:
Please don't declare a feature that services didn't support.
##########
core/core/src/types/capability.rs:
##########
@@ -118,8 +118,16 @@ pub struct Capability {
/// Indicates if Cache-Control can be specified during write operations.
pub write_with_cache_control: bool,
/// Indicates if conditional write operations using If-Match are supported.
+ ///
+ /// The value passed to `if_match` is normally a literal ETag. GCS is an
exception:
+ /// it has no ETag-based conditional write API, so it repurposes this
field to carry
+ /// the object's generation number (`Metadata::version()`) instead.
pub write_with_if_match: bool,
/// Indicates if conditional write operations using If-None-Match are
supported.
+ ///
+ /// The value passed to `if_none_match` is normally a literal ETag. GCS is
an exception:
+ /// it has no ETag-based conditional write API, so it repurposes this
field to carry
Review Comment:
The same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]