chitralverma opened a new issue, #3111:
URL: https://github.com/apache/incubator-opendal/issues/3111

   Possible regression bug in the 0.4.0 version - Seems like the metakeys are 
not propagated with the blocking operators correctly compared to the usual 
async counterpart.
   
   Using commit -` rev = "32d13996925f36c639b5efa63316c62f4874a497"`
   
   - In regular async mode - metadata with`FlagSet(Complete | Mode | 
ContentLength | LastModified)` for files and `FlagSet(Complete | Mode)` for 
directories
   - In blocking mode - metadata with `FlagSet(Mode)` for files and 
`FlagSet(Complete | Mode)` for directories is returned.
   
   Please see the 2 tests below as a reproducible example of this.
    
   ```
   #[cfg(test)]
   mod tests {
       use super::*;
   
       #[test]
       fn sync_list() {
           let mut builder = Fs::default();
           builder.root("/");
   
           let op = Operator::new(builder).unwrap().finish();
           let paths = op
               .blocking()
               .list_with("/Users/chitral/test_data/")
               .metakey(Metakey::ContentLength | Metakey::Mode)
               .delimiter("")
               .call()
               .unwrap();
   
           // returns metadata with FlagSet(Mode) for files and 
FlagSet(Complete | Mode) for directories
           dbg!(&paths);
           dbg!(&paths.len());
       }
   
       #[tokio::test]
       async fn async_list() {
           let mut builder = Fs::default();
           builder.root("/");
   
           let op = Operator::new(builder).unwrap().finish();
           let paths = op
               .list_with("/Users/chitral/test_data/")
               .metakey(Metakey::ContentLength | Metakey::Mode)
               .delimiter("")
               .await
               .unwrap();
   
           // returns metadata with FlagSet(Complete | Mode | ContentLength | 
LastModified) for files
           // and FlagSet(Complete | Mode) for directories
           dbg!(&paths);
           dbg!(&paths.len());
       }
   }
   ```


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