You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/03/15 15:56:35 UTC

[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #1615: feat: add batch limit for AccessorInfo

Xuanwo commented on code in PR #1615:
URL: https://github.com/apache/incubator-opendal/pull/1615#discussion_r1137350088


##########
src/raw/accessor.rs:
##########
@@ -431,6 +432,9 @@ pub struct AccessorInfo {
     scheme: Scheme,
     root: String,
     name: String,
+    /// limit of batch operation
+    /// only meaningful when accessor supports batch operation
+    batch_limit: usize,

Review Comment:
   How about naming to `max_batch_operations`? And maybe we should use `Option<usize>` here?



##########
src/raw/accessor.rs:
##########
@@ -476,6 +480,17 @@ impl AccessorInfo {
         self
     }
 
+    /// Batch size limit of backend, only meaningful when the backend supports batch operation
+    pub fn batch_limit(&self) -> usize {
+        self.batch_limit
+    }
+
+    /// Set batch size limit for backend.
+    pub fn set_batch_limit(&mut self, limit: usize) -> &mut Self {

Review Comment:
   ditto.



##########
src/raw/accessor.rs:
##########
@@ -476,6 +480,17 @@ impl AccessorInfo {
         self
     }
 
+    /// Batch size limit of backend, only meaningful when the backend supports batch operation
+    pub fn batch_limit(&self) -> usize {

Review Comment:
   Please reserve this API as `pub(crate)`, I'm not ready to make it available to our users.



-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org