erickguan commented on code in PR #7977:
URL: https://github.com/apache/opendal/pull/7977#discussion_r4757106087


##########
.github/scripts/test_behavior/plan.py:
##########
@@ -271,6 +276,8 @@ def generate_core_cases(
 def _filter_binding_cases(
     cases: list[dict[str, str]], language: str
 ) -> list[dict[str, str]]:
+    cases = [v for v in cases if (v["service"], v["setup"]) not in 
WINDOWS_SETUPS]

Review Comment:
   Exclusion goes in this function but not here. Exclude them with some filter 
expressions below



##########
core/services/sftp/src/backend.rs:
##########
@@ -465,3 +394,108 @@ impl Service for SftpBackend {
         ))
     }
 }
+
+/// Request data of the `copy-data` extension in
+/// draft-ietf-secsh-filexfer-extensions-00.
+#[derive(Serialize)]
+struct CopyData<'a> {
+    read_from: &'a SftpHandle,
+    read_from_offset: u64,
+    /// Zero copies until the end of the source.
+    read_data_length: u64,
+    write_to: &'a SftpHandle,
+    write_to_offset: u64,
+}
+
+async fn copy_file(
+    core: Arc<SftpCore>,
+    from: String,
+    to: String,
+    source_content_length_hint: Option<u64>,
+) -> Result<Metadata> {
+    let client = Arc::new(core.connect().await?);

Review Comment:
   Curious, does new lib require us using an Arc for client session in general?
   
   I'm not sure if we need to pool clients.



##########
core/services/sftp/src/backend.rs:
##########
@@ -62,16 +67,16 @@ impl SftpBuilder {
 
     /// Sets the time limit for each connection setup stage and each pooled 
connection health check.
     ///
-    /// The limit applies separately to SSH connection and authentication, 
SFTP subsystem
-    /// initialization, and root directory initialization. Defaults to 10 
seconds.
-    /// A zero duration disables these limits.
+    /// The limit applies separately to waiting for an SSH handshake slot, SSH 
connection and
+    /// authentication, SFTP subsystem initialization, and root directory 
initialization.
+    /// Defaults to 10 seconds. A zero duration disables these limits.
     pub fn connect_timeout(mut self, timeout: Duration) -> Self {
         self.connect_timeout = Some(timeout);
         self
     }
 
     /// set endpoint for sftp backend.
-    /// The format is same as `openssh`, using either `[user@]hostname` or 
`ssh://[user@]hostname[:port]`. A username or port that is specified in the 
endpoint overrides the one set in the builder (but does not change the builder).
+    /// The format is either `[user@]hostname[:port]` or 
`ssh://[user@]hostname[:port]`, and the port defaults to 22. A username that is 
specified in the endpoint overrides the one set in the builder (but does not 
change the builder).

Review Comment:
   Mulit-line please.



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