Skip to content

Commit

Permalink
refactor(core): Remove not used cap write_multi_align_size
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Nov 14, 2024
1 parent 4dc0f15 commit 0fd31a7
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 56 deletions.
8 changes: 0 additions & 8 deletions bindings/c/include/opendal.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,14 +515,6 @@ typedef struct opendal_capability {
* If it is not set, this will be zero
*/
uintptr_t write_multi_min_size;
/**
* write_multi_align_size is the align size that services required in write_multi.
*
* For example, Google GCS requires align size to 256KiB in write_multi.
*
* If it is not set, this will be zero
*/
uintptr_t write_multi_align_size;
/**
* write_total_max_size is the max size that services support in write_total.
*
Expand Down
7 changes: 0 additions & 7 deletions bindings/c/src/operator_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ pub struct opendal_capability {
///
/// If it is not set, this will be zero
pub write_multi_min_size: usize,
/// write_multi_align_size is the align size that services required in write_multi.
///
/// For example, Google GCS requires align size to 256KiB in write_multi.
///
/// If it is not set, this will be zero
pub write_multi_align_size: usize,
/// write_total_max_size is the max size that services support in write_total.
///
/// For example, Cloudflare D1 supports 1MB as max in write_total.
Expand Down Expand Up @@ -253,7 +247,6 @@ impl From<core::Capability> for opendal_capability {
write_with_cache_control: value.write_with_cache_control,
write_multi_max_size: value.write_multi_max_size.unwrap_or(0),
write_multi_min_size: value.write_multi_min_size.unwrap_or(0),
write_multi_align_size: value.write_multi_align_size.unwrap_or(0),
write_total_max_size: value.write_total_max_size.unwrap_or(0),
create_dir: value.create_dir,
delete: value.delete,
Expand Down
5 changes: 0 additions & 5 deletions bindings/go/operator_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,6 @@ func (c *Capability) WriteMultiMaxSize() uint {
func (c *Capability) WriteMultiMinSize() uint {
return c.inner.writeMultiMinSize
}

func (c *Capability) WriteMultiAlignSize() uint {
return c.inner.writeMultiAlignSize
}

func (c *Capability) WriteTotalMaxSize() uint {
return c.inner.writeTotalMaxSize
}
Expand Down
1 change: 0 additions & 1 deletion bindings/java/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ fn make_capability<'a>(env: &mut JNIEnv<'a>, cap: Capability) -> Result<JObject<
JValue::Bool(cap.write_with_cache_control as jboolean),
JValue::Long(convert::usize_to_jlong(cap.write_multi_max_size)),
JValue::Long(convert::usize_to_jlong(cap.write_multi_min_size)),
JValue::Long(convert::usize_to_jlong(cap.write_multi_align_size)),
JValue::Bool(cap.create_dir as jboolean),
JValue::Bool(cap.delete as jboolean),
JValue::Bool(cap.copy as jboolean),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,6 @@ public class Capability {
*/
public final long writeMultiMinSize;

/**
* write_multi_align_size is the align size that services required in write_multi.
* For example, Google GCS requires align size to 256KiB in write_multi.
*/
public final long writeMultiAlignSize;

/**
* If operator supports create dir.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public void testBlockingOperatorInfo() {
assertThat(info.fullCapability.write).isTrue();
assertThat(info.fullCapability.delete).isTrue();
assertThat(info.fullCapability.writeCanAppend).isTrue();
assertThat(info.fullCapability.writeMultiAlignSize).isEqualTo(-1);
assertThat(info.fullCapability.writeMultiMaxSize).isEqualTo(-1);
assertThat(info.fullCapability.writeMultiMinSize).isEqualTo(-1);
assertThat(info.fullCapability.batchMaxOperations).isEqualTo(-1);
Expand All @@ -71,7 +70,6 @@ public void testOperatorInfo() {
assertThat(info.fullCapability.write).isTrue();
assertThat(info.fullCapability.delete).isTrue();
assertThat(info.fullCapability.writeCanAppend).isFalse();
assertThat(info.fullCapability.writeMultiAlignSize).isEqualTo(-1);
assertThat(info.fullCapability.writeMultiMaxSize).isEqualTo(-1);
assertThat(info.fullCapability.writeMultiMinSize).isEqualTo(-1);
assertThat(info.fullCapability.batchMaxOperations).isEqualTo(-1);
Expand Down
8 changes: 1 addition & 7 deletions bindings/nodejs/generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ export class Capability {
* For example, AWS S3 requires at least 5MiB in write_multi expect the last one.
*/
get writeMultiMinSize(): bigint | null
/**
* write_multi_align_size is the align size that services required in write_multi.
*
* For example, Google GCS requires align size to 256KiB in write_multi.
*/
get writeMultiAlignSize(): bigint | null
/**
* write_total_max_size is the max size that services support in write_total.
*
Expand Down Expand Up @@ -707,7 +701,7 @@ export class BlockingLister {
next(): Entry | null
}
/** A public layer wrapper */
export class Layer { }
export class Layer {}
/**
* Retry layer
*
Expand Down
9 changes: 0 additions & 9 deletions bindings/nodejs/src/capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,6 @@ impl Capability {
pub fn write_multi_min_size(&self) -> Option<usize> {
self.0.write_multi_min_size
}

/// write_multi_align_size is the align size that services required in write_multi.
///
/// For example, Google GCS requires align size to 256KiB in write_multi.
#[napi(getter)]
pub fn write_multi_align_size(&self) -> Option<usize> {
self.0.write_multi_align_size
}

/// write_total_max_size is the max size that services support in write_total.
///
/// For example, Cloudflare D1 supports 1MB as max in write_total.
Expand Down
1 change: 0 additions & 1 deletion bindings/python/python/opendal/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ class Capability:
write_with_cache_control: bool
write_multi_max_size: Optional[int]
write_multi_min_size: Optional[int]
write_multi_align_size: Optional[int]
write_total_max_size: Optional[int]

create_dir: bool
Expand Down
5 changes: 0 additions & 5 deletions bindings/python/src/capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ pub struct Capability {
///
/// For example, AWS S3 requires at least 5MiB in write_multi expect the last one.
pub write_multi_min_size: Option<usize>,
/// write_multi_align_size is the align size that services required in write_multi.
///
/// For example, Google GCS requires align size to 256KiB in write_multi.
pub write_multi_align_size: Option<usize>,
/// write_total_max_size is the max size that services support in write_total.
///
/// For example, Cloudflare D1 supports 1MB as max in write_total.
Expand Down Expand Up @@ -135,7 +131,6 @@ impl Capability {
write_with_cache_control: capability.write_with_cache_control,
write_multi_max_size: capability.write_multi_max_size,
write_multi_min_size: capability.write_multi_min_size,
write_multi_align_size: capability.write_multi_align_size,
write_total_max_size: capability.write_total_max_size,
create_dir: capability.create_dir,
delete: capability.delete,
Expand Down
2 changes: 0 additions & 2 deletions bindings/ruby/src/capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ define_accessors!(Capability, {
write_with_user_metadata: bool,
write_multi_max_size: Option<usize>,
write_multi_min_size: Option<usize>,
write_multi_align_size: Option<usize>,
write_total_max_size: Option<usize>,
create_dir: bool,
delete: bool,
Expand Down Expand Up @@ -130,7 +129,6 @@ pub fn include(gem_module: &RModule) -> Result<(), Error> {
write_with_user_metadata,
write_multi_max_size,
write_multi_min_size,
write_multi_align_size,
write_total_max_size,
create_dir,
delete,
Expand Down
3 changes: 0 additions & 3 deletions core/src/types/capability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,6 @@ pub struct Capability {
/// Minimum size required for multipart uploads (except for the last part).
/// For example, AWS S3 requires at least 5MiB per part.
pub write_multi_min_size: Option<usize>,
/// Required size alignment for multipart uploads.
/// For example, Google GCS requires 256KiB alignment.
pub write_multi_align_size: Option<usize>,
/// Maximum total size supported for write operations.
/// For example, Cloudflare D1 has a 1MB total size limit.
pub write_total_max_size: Option<usize>,
Expand Down

0 comments on commit 0fd31a7

Please sign in to comment.