Xuanwo commented on PR #8517:
URL: https://github.com/apache/opendal/pull/8517#issuecomment-7049723680

   AI-generated review: Thanks for taking this on and recovering the extra RTT 
for small (≤ 8 MiB) GCS conditional writes (#8504). The single-request fast 
path for `if_not_exists`, `if_version_match`, and `if_version_not_match` is the 
right direction; please address these three items before merge:
   
   1. **Idempotency token for safe short-window retries**: Add a per-write 
stable `X-Goog-Gcs-Idempotency-Token` UUID header on `GcsConditionalWriter`'s 
single-request upload (and resumable session creation) so GCS can deduplicate 
short-window `RetryLayer` retries of `close()` when a commit response is lost, 
at zero extra RTT cost.
   2. **Remove `.expect(...)` panic on invalid `content_type`**: Routing small 
conditional writes with metadata through `multipart/related` in 
`core/services/gcs/src/core.rs:369` (`gcs_insert_object_request`) can panic on 
an invalid `content_type` header value via `.expect("Failed to parse 
content-type")`, whereas the previous resumable path returned a 
request-construction error. Please propagate that as an `Error` instead of 
panicking.
   3. **Mock accuracy & post-fix real-GCS evidence**: In the new mock 
(`core/services/gcs/src/writer.rs:612`), treating a missing object as 
generation `0` incorrectly allows a non-zero `ifGenerationNotMatch` where GCS 
rejects/evaluates it differently—please align the mock with GCS semantics. 
After applying the updates, please share the tested commit SHA and real-GCS 
conditional behavior test output.
   


-- 
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]

Reply via email to