diff --git a/bindings/c/include/opendal.h b/bindings/c/include/opendal.h index 76f84f93341e..3560737dda2d 100644 --- a/bindings/c/include/opendal.h +++ b/bindings/c/include/opendal.h @@ -585,6 +585,10 @@ typedef struct opendal_capability { * If it is not set, this will be zero */ uintptr_t batch_max_operations; + /** + * If operator supports shared. + */ + bool shared; /** * If operator supports blocking. */ diff --git a/bindings/c/src/operator_info.rs b/bindings/c/src/operator_info.rs index db96e99fedf3..e08becbc65f3 100644 --- a/bindings/c/src/operator_info.rs +++ b/bindings/c/src/operator_info.rs @@ -135,6 +135,9 @@ pub struct opendal_capability { /// If it is not set, this will be zero pub batch_max_operations: usize, + /// If operator supports shared. + pub shared: bool, + /// If operator supports blocking. pub blocking: bool, } @@ -263,6 +266,7 @@ impl From for opendal_capability { batch: value.batch, batch_delete: value.batch_delete, batch_max_operations: value.batch_max_operations.unwrap_or(0), + shared: value.shared, blocking: value.blocking, } } diff --git a/bindings/go/operator_info.go b/bindings/go/operator_info.go index d9264b6c869e..70f5c1e5532e 100644 --- a/bindings/go/operator_info.go +++ b/bindings/go/operator_info.go @@ -240,6 +240,10 @@ func (c *Capability) BatchMaxOperations() uint { return c.inner.batchMaxOperations } +func (c *Capability) Shared() bool { + return c.inner.shared == 1 +} + func (c *Capability) Blocking() bool { return c.inner.blocking == 1 } diff --git a/bindings/go/types.go b/bindings/go/types.go index d5bd92495d29..79a4f3fa84e4 100644 --- a/bindings/go/types.go +++ b/bindings/go/types.go @@ -163,6 +163,7 @@ var ( &ffi.TypeUint8, // batch &ffi.TypeUint8, // batch_delete &ffi.TypePointer, // batch_max_operations + &ffi.TypeUint8, // shared &ffi.TypeUint8, // blocking nil, }[0], @@ -204,6 +205,7 @@ type opendalCapability struct { batch uint8 batchDelete uint8 batchMaxOperations uint + shared uint8 blocking uint8 } diff --git a/bindings/java/src/lib.rs b/bindings/java/src/lib.rs index a9fef7e6506f..d19da1fb2fb6 100644 --- a/bindings/java/src/lib.rs +++ b/bindings/java/src/lib.rs @@ -94,7 +94,7 @@ fn make_operator_info<'a>(env: &mut JNIEnv<'a>, info: OperatorInfo) -> Result(env: &mut JNIEnv<'a>, cap: Capability) -> Result> { let capability = env.new_object( "org/apache/opendal/Capability", - "(ZZZZZZZZZZZZZZZJJZZZZZZZZZZZZZZJZ)V", + "(ZZZZZZZZZZZZZZZJJZZZZZZZZZZZZZZJZZ)V", &[ JValue::Bool(cap.stat as jboolean), JValue::Bool(cap.stat_with_if_match as jboolean), @@ -128,6 +128,7 @@ fn make_capability<'a>(env: &mut JNIEnv<'a>, cap: Capability) -> Result bool { + self.0.shared + } + /// If operator supports blocking. #[napi(getter)] pub fn blocking(&self) -> bool { diff --git a/bindings/python/python/opendal/__init__.pyi b/bindings/python/python/opendal/__init__.pyi index 2a2ae246b3f8..418d8841a662 100644 --- a/bindings/python/python/opendal/__init__.pyi +++ b/bindings/python/python/opendal/__init__.pyi @@ -204,4 +204,5 @@ class Capability: batch_delete: bool batch_max_operations: Optional[int] + shared: bool blocking: bool diff --git a/bindings/python/src/capability.rs b/bindings/python/src/capability.rs index 6cc76e153f4d..ac424ba698fc 100644 --- a/bindings/python/src/capability.rs +++ b/bindings/python/src/capability.rs @@ -105,6 +105,9 @@ pub struct Capability { /// The max operations that operator supports in batch. pub batch_max_operations: Option, + /// If operator supports shared. + pub shared: bool, + /// If operator supports blocking. pub blocking: bool, } @@ -147,6 +150,7 @@ impl Capability { batch: capability.batch, batch_delete: capability.batch_delete, batch_max_operations: capability.batch_max_operations, + shared: capability.shared, blocking: capability.blocking, } } diff --git a/bindings/ruby/src/capability.rs b/bindings/ruby/src/capability.rs index a2402dceb51c..32166bc0c45d 100644 --- a/bindings/ruby/src/capability.rs +++ b/bindings/ruby/src/capability.rs @@ -97,7 +97,8 @@ define_accessors!(Capability, { batch: bool, batch_delete: bool, batch_max_operations: Option, - blocking: bool + shared: bool, + blocking: bool, }); // includes class into the Ruby module diff --git a/core/src/raw/adapters/typed_kv/api.rs b/core/src/raw/adapters/typed_kv/api.rs index f1e4a95fc47a..a3d0490845b8 100644 --- a/core/src/raw/adapters/typed_kv/api.rs +++ b/core/src/raw/adapters/typed_kv/api.rs @@ -130,6 +130,8 @@ pub struct Capability { pub delete: bool, /// If typed_kv operator supports scan natively. pub scan: bool, + /// If typed_kv operator supports shared access. + pub shared: bool, } impl Debug for Capability { @@ -148,6 +150,9 @@ impl Debug for Capability { if self.scan { s.push("Scan"); } + if self.shared { + s.push("Shared"); + } write!(f, "{{ {} }}", s.join(" | ")) } diff --git a/core/src/raw/adapters/typed_kv/backend.rs b/core/src/raw/adapters/typed_kv/backend.rs index 59d10a47e356..fca684772f5e 100644 --- a/core/src/raw/adapters/typed_kv/backend.rs +++ b/core/src/raw/adapters/typed_kv/backend.rs @@ -87,6 +87,10 @@ impl Access for Backend { cap.list_with_recursive = true; } + if kv_cap.shared { + cap.shared = true; + } + cap.blocking = true; am.set_native_capability(cap); diff --git a/core/src/services/aliyun_drive/backend.rs b/core/src/services/aliyun_drive/backend.rs index 95cf1b75499d..c9103cc14a8b 100644 --- a/core/src/services/aliyun_drive/backend.rs +++ b/core/src/services/aliyun_drive/backend.rs @@ -230,7 +230,7 @@ impl Access for AliyunDriveBackend { rename: true, list: true, list_with_limit: true, - + shared: true, ..Default::default() }); am.into() diff --git a/core/src/services/alluxio/backend.rs b/core/src/services/alluxio/backend.rs index a5882c2910e9..bea21a364012 100644 --- a/core/src/services/alluxio/backend.rs +++ b/core/src/services/alluxio/backend.rs @@ -169,6 +169,8 @@ impl Access for AlluxioBackend { list: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/atomicserver/backend.rs b/core/src/services/atomicserver/backend.rs index 546e6d25989f..5683cfea06be 100644 --- a/core/src/services/atomicserver/backend.rs +++ b/core/src/services/atomicserver/backend.rs @@ -361,6 +361,7 @@ impl kv::Adapter for Adapter { read: true, write: true, delete: true, + shared: true, ..Default::default() }, ) diff --git a/core/src/services/azblob/backend.rs b/core/src/services/azblob/backend.rs index 820cfcec0916..e2ab452ddf1c 100644 --- a/core/src/services/azblob/backend.rs +++ b/core/src/services/azblob/backend.rs @@ -537,6 +537,8 @@ impl Access for AzblobBackend { batch_delete: true, batch_max_operations: Some(self.core.batch_max_operations), + shared: true, + ..Default::default() }); diff --git a/core/src/services/azdls/backend.rs b/core/src/services/azdls/backend.rs index 534c7c190951..8710077e394c 100644 --- a/core/src/services/azdls/backend.rs +++ b/core/src/services/azdls/backend.rs @@ -242,6 +242,8 @@ impl Access for AzdlsBackend { list: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/azfile/backend.rs b/core/src/services/azfile/backend.rs index 31ca40308fc9..1f68439b5511 100644 --- a/core/src/services/azfile/backend.rs +++ b/core/src/services/azfile/backend.rs @@ -253,6 +253,8 @@ impl Access for AzfileBackend { list: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/b2/backend.rs b/core/src/services/b2/backend.rs index 2e613a81f046..b785af8bd0ba 100644 --- a/core/src/services/b2/backend.rs +++ b/core/src/services/b2/backend.rs @@ -259,6 +259,8 @@ impl Access for B2Backend { presign_write: true, presign_stat: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/cacache/backend.rs b/core/src/services/cacache/backend.rs index 1ef193a68252..71d4c3f839f1 100644 --- a/core/src/services/cacache/backend.rs +++ b/core/src/services/cacache/backend.rs @@ -96,6 +96,7 @@ impl kv::Adapter for Adapter { write: true, delete: true, blocking: true, + shared: false, ..Default::default() }, ) diff --git a/core/src/services/chainsafe/backend.rs b/core/src/services/chainsafe/backend.rs index 64832841f4d4..e5373f4c3471 100644 --- a/core/src/services/chainsafe/backend.rs +++ b/core/src/services/chainsafe/backend.rs @@ -187,6 +187,8 @@ impl Access for ChainsafeBackend { list: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/cloudflare_kv/backend.rs b/core/src/services/cloudflare_kv/backend.rs index c2be1ddd1663..5d4a65a4b31a 100644 --- a/core/src/services/cloudflare_kv/backend.rs +++ b/core/src/services/cloudflare_kv/backend.rs @@ -191,6 +191,7 @@ impl kv::Adapter for Adapter { read: true, write: true, list: true, + shared: true, ..Default::default() }, diff --git a/core/src/services/compfs/backend.rs b/core/src/services/compfs/backend.rs index f24fd54e5d8c..9c43a82d4c80 100644 --- a/core/src/services/compfs/backend.rs +++ b/core/src/services/compfs/backend.rs @@ -130,6 +130,8 @@ impl Access for CompfsBackend { copy: true, rename: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/cos/backend.rs b/core/src/services/cos/backend.rs index df297d19647a..1e27d7f6dfa0 100644 --- a/core/src/services/cos/backend.rs +++ b/core/src/services/cos/backend.rs @@ -284,6 +284,8 @@ impl Access for CosBackend { presign_read: true, presign_write: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/d1/backend.rs b/core/src/services/d1/backend.rs index 643617431e47..a86d47ab8862 100644 --- a/core/src/services/d1/backend.rs +++ b/core/src/services/d1/backend.rs @@ -270,6 +270,7 @@ impl kv::Adapter for Adapter { // Cloudflare D1 supports 1MB as max in write_total. // refer to https://developers.cloudflare.com/d1/platform/limits/ write_total_max_size: Some(1000 * 1000), + shared: true, ..Default::default() }, ) diff --git a/core/src/services/dashmap/backend.rs b/core/src/services/dashmap/backend.rs index 1f4ea285ee05..09889b4a51d3 100644 --- a/core/src/services/dashmap/backend.rs +++ b/core/src/services/dashmap/backend.rs @@ -94,6 +94,7 @@ impl typed_kv::Adapter for Adapter { set: true, scan: true, delete: true, + shared: false, }, ) } diff --git a/core/src/services/dbfs/backend.rs b/core/src/services/dbfs/backend.rs index ee2cc2ac0546..f3ae3399363c 100644 --- a/core/src/services/dbfs/backend.rs +++ b/core/src/services/dbfs/backend.rs @@ -163,6 +163,8 @@ impl Access for DbfsBackend { list: true, + shared: true, + ..Default::default() }); am.into() diff --git a/core/src/services/dropbox/backend.rs b/core/src/services/dropbox/backend.rs index 9cc96b0ddce0..2544ac3ac238 100644 --- a/core/src/services/dropbox/backend.rs +++ b/core/src/services/dropbox/backend.rs @@ -68,6 +68,8 @@ impl Access for DropboxBackend { batch: true, batch_delete: true, + shared: true, + ..Default::default() }); ma.into() diff --git a/core/src/services/etcd/backend.rs b/core/src/services/etcd/backend.rs index 4a6e94f13bd9..8365908090bf 100644 --- a/core/src/services/etcd/backend.rs +++ b/core/src/services/etcd/backend.rs @@ -282,6 +282,7 @@ impl kv::Adapter for Adapter { read: true, write: true, list: true, + shared: true, ..Default::default() }, diff --git a/core/src/services/foundationdb/backend.rs b/core/src/services/foundationdb/backend.rs index b9c70946b5f4..c72099cb1e3f 100644 --- a/core/src/services/foundationdb/backend.rs +++ b/core/src/services/foundationdb/backend.rs @@ -120,6 +120,7 @@ impl kv::Adapter for Adapter { read: true, write: true, delete: true, + shared: true, ..Default::default() }, ) diff --git a/core/src/services/fs/backend.rs b/core/src/services/fs/backend.rs index 2572361e35dd..ae3ad891d1e7 100644 --- a/core/src/services/fs/backend.rs +++ b/core/src/services/fs/backend.rs @@ -191,6 +191,8 @@ impl Access for FsBackend { rename: true, blocking: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/ftp/backend.rs b/core/src/services/ftp/backend.rs index 144ba9aff7ad..85bb394687a8 100644 --- a/core/src/services/ftp/backend.rs +++ b/core/src/services/ftp/backend.rs @@ -281,6 +281,8 @@ impl Access for FtpBackend { list: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/gcs/backend.rs b/core/src/services/gcs/backend.rs index 5c35abf66ab2..a2c7ed910a68 100644 --- a/core/src/services/gcs/backend.rs +++ b/core/src/services/gcs/backend.rs @@ -395,6 +395,8 @@ impl Access for GcsBackend { presign_read: true, presign_write: true, + shared: true, + ..Default::default() }); am.into() diff --git a/core/src/services/gdrive/backend.rs b/core/src/services/gdrive/backend.rs index 09c51fd2c834..9809d741ff77 100644 --- a/core/src/services/gdrive/backend.rs +++ b/core/src/services/gdrive/backend.rs @@ -64,6 +64,9 @@ impl Access for GdriveBackend { delete: true, rename: true, copy: true, + + shared: true, + ..Default::default() }); diff --git a/core/src/services/ghac/backend.rs b/core/src/services/ghac/backend.rs index 1cd2bafd1253..7035d6835738 100644 --- a/core/src/services/ghac/backend.rs +++ b/core/src/services/ghac/backend.rs @@ -248,6 +248,8 @@ impl Access for GhacBackend { write_can_multi: true, delete: true, + shared: true, + ..Default::default() }); am.into() diff --git a/core/src/services/github/backend.rs b/core/src/services/github/backend.rs index 23dfee60b145..867879010f66 100644 --- a/core/src/services/github/backend.rs +++ b/core/src/services/github/backend.rs @@ -199,6 +199,8 @@ impl Access for GithubBackend { list: true, list_with_recursive: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/gridfs/backend.rs b/core/src/services/gridfs/backend.rs index f2bb2341534c..ad31fcc3ce33 100644 --- a/core/src/services/gridfs/backend.rs +++ b/core/src/services/gridfs/backend.rs @@ -221,6 +221,7 @@ impl kv::Adapter for Adapter { Capability { read: true, write: true, + shared: true, ..Default::default() }, ) diff --git a/core/src/services/hdfs/backend.rs b/core/src/services/hdfs/backend.rs index 4d87d24a108c..403c78957c2f 100644 --- a/core/src/services/hdfs/backend.rs +++ b/core/src/services/hdfs/backend.rs @@ -230,6 +230,8 @@ impl Access for HdfsBackend { rename: true, blocking: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/hdfs_native/backend.rs b/core/src/services/hdfs_native/backend.rs index 31ae8ed70ebc..131d93f814b9 100644 --- a/core/src/services/hdfs_native/backend.rs +++ b/core/src/services/hdfs_native/backend.rs @@ -161,6 +161,8 @@ impl Access for HdfsNativeBackend { rename: true, blocking: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/http/backend.rs b/core/src/services/http/backend.rs index ff739014ff49..e6b913d93eb6 100644 --- a/core/src/services/http/backend.rs +++ b/core/src/services/http/backend.rs @@ -218,6 +218,8 @@ impl Access for HttpBackend { presign_read: !self.has_authorization(), presign_stat: !self.has_authorization(), + shared: true, + ..Default::default() }); diff --git a/core/src/services/huggingface/backend.rs b/core/src/services/huggingface/backend.rs index 2a893b4bc8ca..f70bdd6557c0 100644 --- a/core/src/services/huggingface/backend.rs +++ b/core/src/services/huggingface/backend.rs @@ -209,6 +209,8 @@ impl Access for HuggingfaceBackend { list: true, list_with_recursive: true, + shared: true, + ..Default::default() }); am.into() diff --git a/core/src/services/icloud/backend.rs b/core/src/services/icloud/backend.rs index e0531fca39c2..2708703604f4 100644 --- a/core/src/services/icloud/backend.rs +++ b/core/src/services/icloud/backend.rs @@ -239,6 +239,7 @@ impl Access for IcloudBackend { .set_native_capability(Capability { stat: true, read: true, + shared: true, ..Default::default() }); ma.into() diff --git a/core/src/services/ipfs/backend.rs b/core/src/services/ipfs/backend.rs index a63afce8874a..5ef62a1e470f 100644 --- a/core/src/services/ipfs/backend.rs +++ b/core/src/services/ipfs/backend.rs @@ -179,6 +179,8 @@ impl Access for IpfsBackend { list: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/ipmfs/backend.rs b/core/src/services/ipmfs/backend.rs index 86cd6f949882..97f6a0789318 100644 --- a/core/src/services/ipmfs/backend.rs +++ b/core/src/services/ipmfs/backend.rs @@ -82,6 +82,8 @@ impl Access for IpmfsBackend { list: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/koofr/backend.rs b/core/src/services/koofr/backend.rs index 59016ee71d3c..948226c962b0 100644 --- a/core/src/services/koofr/backend.rs +++ b/core/src/services/koofr/backend.rs @@ -224,6 +224,8 @@ impl Access for KoofrBackend { list: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/lakefs/backend.rs b/core/src/services/lakefs/backend.rs index dc913e2528cc..d3086b3786d0 100644 --- a/core/src/services/lakefs/backend.rs +++ b/core/src/services/lakefs/backend.rs @@ -211,6 +211,7 @@ impl Access for LakefsBackend { write: true, delete: true, copy: true, + shared: true, ..Default::default() }); am.into() diff --git a/core/src/services/libsql/backend.rs b/core/src/services/libsql/backend.rs index 233580c78e9f..1867d3bbbfaf 100644 --- a/core/src/services/libsql/backend.rs +++ b/core/src/services/libsql/backend.rs @@ -315,6 +315,7 @@ impl kv::Adapter for Adapter { read: true, write: true, delete: true, + shared: true, ..Default::default() }, ) diff --git a/core/src/services/memcached/backend.rs b/core/src/services/memcached/backend.rs index 2b772f713e5e..5ddfa4b9c114 100644 --- a/core/src/services/memcached/backend.rs +++ b/core/src/services/memcached/backend.rs @@ -206,6 +206,7 @@ impl kv::Adapter for Adapter { Capability { read: true, write: true, + shared: true, ..Default::default() }, diff --git a/core/src/services/memory/backend.rs b/core/src/services/memory/backend.rs index e9b4238896d2..a6475ab8a1e3 100644 --- a/core/src/services/memory/backend.rs +++ b/core/src/services/memory/backend.rs @@ -84,6 +84,7 @@ impl typed_kv::Adapter for Adapter { set: true, delete: true, scan: true, + shared: false, }, ) } diff --git a/core/src/services/mini_moka/backend.rs b/core/src/services/mini_moka/backend.rs index 1fed62b31d95..23587e1e307e 100644 --- a/core/src/services/mini_moka/backend.rs +++ b/core/src/services/mini_moka/backend.rs @@ -143,6 +143,7 @@ impl typed_kv::Adapter for Adapter { set: true, delete: true, scan: true, + shared: false, }, ) } diff --git a/core/src/services/moka/backend.rs b/core/src/services/moka/backend.rs index 4a2e34e5f903..608bc902b56d 100644 --- a/core/src/services/moka/backend.rs +++ b/core/src/services/moka/backend.rs @@ -166,6 +166,7 @@ impl typed_kv::Adapter for Adapter { set: true, delete: true, scan: true, + shared: false, }, ) } diff --git a/core/src/services/mongodb/backend.rs b/core/src/services/mongodb/backend.rs index ed5f26a411e9..a3edd88dfcb7 100644 --- a/core/src/services/mongodb/backend.rs +++ b/core/src/services/mongodb/backend.rs @@ -235,6 +235,7 @@ impl kv::Adapter for Adapter { Capability { read: true, write: true, + shared: true, ..Default::default() }, ) diff --git a/core/src/services/monoiofs/backend.rs b/core/src/services/monoiofs/backend.rs index 76f6880dc77a..8fc139386e9c 100644 --- a/core/src/services/monoiofs/backend.rs +++ b/core/src/services/monoiofs/backend.rs @@ -121,6 +121,7 @@ impl Access for MonoiofsBackend { rename: true, create_dir: true, copy: true, + shared: true, ..Default::default() }); am.into() diff --git a/core/src/services/mysql/backend.rs b/core/src/services/mysql/backend.rs index ada294d26691..ad4ad4374b55 100644 --- a/core/src/services/mysql/backend.rs +++ b/core/src/services/mysql/backend.rs @@ -198,6 +198,7 @@ impl kv::Adapter for Adapter { read: true, write: true, delete: true, + shared: true, ..Default::default() }, ) diff --git a/core/src/services/nebula_graph/backend.rs b/core/src/services/nebula_graph/backend.rs index 4d70e3210a73..37275cf4177d 100644 --- a/core/src/services/nebula_graph/backend.rs +++ b/core/src/services/nebula_graph/backend.rs @@ -283,6 +283,7 @@ impl kv::Adapter for Adapter { write_can_empty: true, delete: true, list: true, + shared: true, ..Default::default() }, ) diff --git a/core/src/services/obs/backend.rs b/core/src/services/obs/backend.rs index 3c4383134777..82a41a192c15 100644 --- a/core/src/services/obs/backend.rs +++ b/core/src/services/obs/backend.rs @@ -291,6 +291,8 @@ impl Access for ObsBackend { presign_read: true, presign_write: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/onedrive/backend.rs b/core/src/services/onedrive/backend.rs index a89df094d10c..ca2b34c9a84f 100644 --- a/core/src/services/onedrive/backend.rs +++ b/core/src/services/onedrive/backend.rs @@ -80,6 +80,7 @@ impl Access for OnedriveBackend { delete: true, create_dir: true, list: true, + shared: true, ..Default::default() }); diff --git a/core/src/services/oss/backend.rs b/core/src/services/oss/backend.rs index 1ed309e4e810..47018795fb36 100644 --- a/core/src/services/oss/backend.rs +++ b/core/src/services/oss/backend.rs @@ -478,6 +478,8 @@ impl Access for OssBackend { batch: true, batch_max_operations: Some(self.core.batch_max_operations), + shared: true, + ..Default::default() }); diff --git a/core/src/services/pcloud/backend.rs b/core/src/services/pcloud/backend.rs index a4ea74c3d7a3..07078f8d2046 100644 --- a/core/src/services/pcloud/backend.rs +++ b/core/src/services/pcloud/backend.rs @@ -213,6 +213,8 @@ impl Access for PcloudBackend { list: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/persy/backend.rs b/core/src/services/persy/backend.rs index c9234f1878cb..8ff8bad67f4e 100644 --- a/core/src/services/persy/backend.rs +++ b/core/src/services/persy/backend.rs @@ -163,6 +163,7 @@ impl kv::Adapter for Adapter { write: true, delete: true, blocking: true, + shared: false, ..Default::default() }, ) diff --git a/core/src/services/postgresql/backend.rs b/core/src/services/postgresql/backend.rs index 72993c3af6a1..ab45709090ab 100644 --- a/core/src/services/postgresql/backend.rs +++ b/core/src/services/postgresql/backend.rs @@ -196,6 +196,7 @@ impl kv::Adapter for Adapter { Capability { read: true, write: true, + shared: true, ..Default::default() }, ) diff --git a/core/src/services/redb/backend.rs b/core/src/services/redb/backend.rs index b0722f824cec..b8951ac1880d 100644 --- a/core/src/services/redb/backend.rs +++ b/core/src/services/redb/backend.rs @@ -121,6 +121,7 @@ impl kv::Adapter for Adapter { read: true, write: true, blocking: true, + shared: false, ..Default::default() }, ) diff --git a/core/src/services/redis/backend.rs b/core/src/services/redis/backend.rs index 19afe34c7655..c9eb204268e3 100644 --- a/core/src/services/redis/backend.rs +++ b/core/src/services/redis/backend.rs @@ -336,6 +336,7 @@ impl kv::Adapter for Adapter { Capability { read: true, write: true, + shared: true, ..Default::default() }, diff --git a/core/src/services/rocksdb/backend.rs b/core/src/services/rocksdb/backend.rs index 8dc3c6d2a2ba..3092bddef684 100644 --- a/core/src/services/rocksdb/backend.rs +++ b/core/src/services/rocksdb/backend.rs @@ -119,6 +119,7 @@ impl kv::Adapter for Adapter { write: true, list: true, blocking: true, + shared: false, ..Default::default() }, ) diff --git a/core/src/services/s3/backend.rs b/core/src/services/s3/backend.rs index 5b523fc72bc0..65dca0f449b2 100644 --- a/core/src/services/s3/backend.rs +++ b/core/src/services/s3/backend.rs @@ -959,6 +959,8 @@ impl Access for S3Backend { batch: true, batch_max_operations: Some(self.core.batch_max_operations), + shared: true, + ..Default::default() }); diff --git a/core/src/services/seafile/backend.rs b/core/src/services/seafile/backend.rs index fe780691394b..77581a4d772d 100644 --- a/core/src/services/seafile/backend.rs +++ b/core/src/services/seafile/backend.rs @@ -232,6 +232,8 @@ impl Access for SeafileBackend { list: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/sftp/backend.rs b/core/src/services/sftp/backend.rs index 8e3c103f7862..552845ba319b 100644 --- a/core/src/services/sftp/backend.rs +++ b/core/src/services/sftp/backend.rs @@ -344,6 +344,8 @@ impl Access for SftpBackend { copy: self.copyable, rename: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/sled/backend.rs b/core/src/services/sled/backend.rs index 64c4c367581e..308859945d7a 100644 --- a/core/src/services/sled/backend.rs +++ b/core/src/services/sled/backend.rs @@ -148,6 +148,7 @@ impl kv::Adapter for Adapter { write: true, list: true, blocking: true, + shared: false, ..Default::default() }, ) diff --git a/core/src/services/sqlite/backend.rs b/core/src/services/sqlite/backend.rs index 6f9c1aa15530..a6bfeb35da06 100644 --- a/core/src/services/sqlite/backend.rs +++ b/core/src/services/sqlite/backend.rs @@ -233,6 +233,7 @@ impl kv::Adapter for Adapter { write: true, delete: true, list: true, + shared: false, ..Default::default() }, ) diff --git a/core/src/services/supabase/backend.rs b/core/src/services/supabase/backend.rs index c6923217d8e5..623ec87b430b 100644 --- a/core/src/services/supabase/backend.rs +++ b/core/src/services/supabase/backend.rs @@ -166,6 +166,8 @@ impl Access for SupabaseBackend { write: true, delete: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/surrealdb/backend.rs b/core/src/services/surrealdb/backend.rs index d7de77252683..3026a9c4e796 100644 --- a/core/src/services/surrealdb/backend.rs +++ b/core/src/services/surrealdb/backend.rs @@ -292,6 +292,7 @@ impl kv::Adapter for Adapter { Capability { read: true, write: true, + shared: true, ..Default::default() }, ) diff --git a/core/src/services/swift/backend.rs b/core/src/services/swift/backend.rs index a436eff22aaf..adadbf46c64f 100644 --- a/core/src/services/swift/backend.rs +++ b/core/src/services/swift/backend.rs @@ -196,6 +196,8 @@ impl Access for SwiftBackend { list: true, list_with_recursive: true, + shared: true, + ..Default::default() }); am.into() diff --git a/core/src/services/tikv/backend.rs b/core/src/services/tikv/backend.rs index 5d37b526d5db..e6f343943ac0 100644 --- a/core/src/services/tikv/backend.rs +++ b/core/src/services/tikv/backend.rs @@ -195,6 +195,7 @@ impl kv::Adapter for Adapter { read: true, write: true, blocking: false, + shared: true, ..Default::default() }, ) diff --git a/core/src/services/upyun/backend.rs b/core/src/services/upyun/backend.rs index ae8e23765e1a..36598d53fa64 100644 --- a/core/src/services/upyun/backend.rs +++ b/core/src/services/upyun/backend.rs @@ -223,6 +223,8 @@ impl Access for UpyunBackend { list: true, list_with_limit: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/vercel_artifacts/backend.rs b/core/src/services/vercel_artifacts/backend.rs index c56555988db7..923f9d3ba9ce 100644 --- a/core/src/services/vercel_artifacts/backend.rs +++ b/core/src/services/vercel_artifacts/backend.rs @@ -61,6 +61,8 @@ impl Access for VercelArtifactsBackend { write: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/vercel_blob/backend.rs b/core/src/services/vercel_blob/backend.rs index 0742e846355a..635e7533b4d9 100644 --- a/core/src/services/vercel_blob/backend.rs +++ b/core/src/services/vercel_blob/backend.rs @@ -171,6 +171,8 @@ impl Access for VercelBlobBackend { list: true, list_with_limit: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/webdav/backend.rs b/core/src/services/webdav/backend.rs index 7bf50888d0f2..6fd4b8567955 100644 --- a/core/src/services/webdav/backend.rs +++ b/core/src/services/webdav/backend.rs @@ -231,6 +231,8 @@ impl Access for WebdavBackend { list: true, // We already support recursive list but some details still need to polish. // list_with_recursive: true, + shared: true, + ..Default::default() }); diff --git a/core/src/services/webhdfs/backend.rs b/core/src/services/webhdfs/backend.rs index 660abc266ab4..4149a6986a29 100644 --- a/core/src/services/webhdfs/backend.rs +++ b/core/src/services/webhdfs/backend.rs @@ -539,6 +539,8 @@ impl Access for WebhdfsBackend { list: true, + shared: true, + ..Default::default() }); am.into() diff --git a/core/src/services/yandex_disk/backend.rs b/core/src/services/yandex_disk/backend.rs index 230066c59a3c..7dbd42b46913 100644 --- a/core/src/services/yandex_disk/backend.rs +++ b/core/src/services/yandex_disk/backend.rs @@ -173,6 +173,8 @@ impl Access for YandexDiskBackend { list: true, list_with_limit: true, + shared: true, + ..Default::default() }); diff --git a/core/src/types/capability.rs b/core/src/types/capability.rs index b30cbf880f90..b3a9e3af9d09 100644 --- a/core/src/types/capability.rs +++ b/core/src/types/capability.rs @@ -205,6 +205,9 @@ pub struct Capability { /// Maximum number of operations supported in a single batch. pub batch_max_operations: Option, + /// Indicate if the operator supports shared access. + pub shared: bool, + /// Indicates if blocking operations are supported. pub blocking: bool, } @@ -224,6 +227,9 @@ impl Debug for Capability { if self.presign { f.write_str("| Presign")?; } + if self.shared { + f.write_str("| Shared")?; + } if self.blocking { f.write_str("| Blocking")?; }