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

[GitHub] [incubator-opendal] WenyXu opened a new issue, #3052: The `FsBackend` only writes partial bytes and doesn't raise any errors

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

   
   We designed some chaos tests, which simulate what problems will occur when the disk is full.
   
   **Prepares**
   ```
   fallocate -l 512K disk.img 
   mkfs disk.img 
   mkdir ./td
   sudo mount -o loop td.img ./td
   chmod a+wr ./td
   ```
   **Codes**
   
   ```rust
   #[tokio::test(flavor = "multi_thread")]
   async fn object_store_write() {
       let mut builder = object_store::services::Fs::default();
       let root_dir = "/tmp/chaos/td/";
   
       let _ = builder.root(root_dir);
       let store = ObjectStore::new(builder).unwrap().finish();
   
       // XKB
       let data = [96u8; 1024 * 512]; // The writable was smaller than 512KB
       store.write("/test", data.to_vec()).await.unwrap();
   }
   ```
   
   The test was expected to raise `no space` errors, but it didn't.
   
   ```
   test tests::standalone_read_write::object_store_write ... ok
   ```
   
   However, if we check the written file, it only contains partial bytes.
   
   ```bash
   ➜  td ls -lh  
   total 448K
   drwx------ 2 root root  16K Sep 13 08:28 lost+found
   -rw-rw-r-- 1 weny weny 428K Sep 13 09:10 test
   ```
   
   See also: https://github.com/tokio-rs/tokio/issues/6005


-- 
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.apache.org

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


[GitHub] [incubator-opendal] Xuanwo commented on issue #3052: The `FsBackend` only writes partial bytes and doesn't raise any errors

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #3052:
URL: https://github.com/apache/incubator-opendal/issues/3052#issuecomment-1717317432

   Thanks for the report! I will take a look and add a test in CI for fs.


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


[GitHub] [incubator-opendal] WenyXu commented on issue #3052: The `FsBackend` only writes partial bytes and doesn't raise any errors

Posted by "WenyXu (via GitHub)" <gi...@apache.org>.
WenyXu commented on issue #3052:
URL: https://github.com/apache/incubator-opendal/issues/3052#issuecomment-1717334116

   > Thanks for the report! I will take a look and add a test in CI for fs.
   
   Let me submit a PR for quick-fix.


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


[GitHub] [incubator-opendal] Xuanwo commented on issue #3052: The `FsBackend` only writes partial bytes and doesn't raise any errors

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #3052:
URL: https://github.com/apache/incubator-opendal/issues/3052#issuecomment-1719003309

   This issus has been fixed by @WenyXu in https://github.com/apache/incubator-opendal/pull/3053. We will continue the work at https://github.com/apache/incubator-opendal/issues/3062


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


[GitHub] [incubator-opendal] Xuanwo closed issue #3052: The `FsBackend` only writes partial bytes and doesn't raise any errors

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed issue #3052: The `FsBackend` only writes partial bytes and doesn't raise any errors
URL: https://github.com/apache/incubator-opendal/issues/3052


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