opendal icon indicating copy to clipboard operation
opendal copied to clipboard

Confusing S3Config enable_write_with_append

Open tisonkun opened this issue 9 months ago • 4 comments

https://github.com/apache/opendal/blob/cf3e44fffb9f3871b4c496ffe1a9456f8e420f98/core/src/services/s3/config.rs#L189-L190

IIUC even if enable_write_with_append is true, one should still call write_op.append to issue an append write.

And this option is by default set to false.

Maybe we can inline it always with true since no reason we forbid our users from using S3's append functionality?

cc @Xuanwo

tisonkun avatar Mar 21 '25 14:03 tisonkun

This reminds me that we might be able to remove all feature enable configurations from our code lile enable version and enable append write. We can take a different approach to managing our test suite sets.

Xuanwo avatar Mar 22 '25 06:03 Xuanwo

@Xuanwo What does it mean? Do you mean that we can remove this option and perhaps other similar options?

We can take a different approach to managing our test suite sets

How do we use these options in test suite right now?

tisonkun avatar Mar 22 '25 06:03 tisonkun

How do we use these options in test suite right now?

Features like versioning and append write require bucket configuration. For example:

  • The user must enable bucket versioning to use list_with_versions.
  • The user must use an express zone bucket to enable writing with append.

In our tests, we will use different buckets with different settings for testing. These settings will affect the capabilities provided in S3 service. Therefore, in tests, we can ignore those that require features not enabled.

Xuanwo avatar Mar 22 '25 08:03 Xuanwo

There are also special cases in oss that write_with_if_not_exists doen't work after versioning enabled.

Xuanwo avatar Mar 22 '25 09:03 Xuanwo