Skip to content

Commit b459400

Browse files
authored
fix: Use stat instead of list for checking storage (#14680)
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent b5b40f7 commit b459400

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/common/storage/src/operator.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,14 @@ impl DataOperator {
480480
// IO hang on reuse connection.
481481
let op = operator.clone();
482482
if let Err(cause) = GlobalIORuntime::instance()
483-
.spawn(GLOBAL_TASK, async move { op.check().await })
483+
.spawn(GLOBAL_TASK, async move {
484+
let res = op.stat("/").await;
485+
match res {
486+
Ok(_) => Ok(()),
487+
Err(e) if e.kind() == opendal::ErrorKind::NotFound => Ok(()),
488+
Err(e) => Err(e),
489+
}
490+
})
484491
.await
485492
.expect("join must succeed")
486493
{

0 commit comments

Comments
 (0)