apache / apache/opendal

Support `Operator::remove_all` in huaweicloud OBS Parallel File System

Open
#6,032 3 comments 3 reactions 0 assignees View on GitHub
enhancement services/obs
Dominant language
Rust
Stars
5.4k
Forks
825
Avg merge
1d 14m
Merged PRs (30d)
127

Description

### Describe the bug

Huaweicloud OBS has concept of directory, which isn't part of S3 protocol.

This difference brings some issues when performing recursive deletion.

For example, if we are trying to invoke `Operator::remove_all` on a prefix, it will try to `stat` the prefix first. OBS will return a directory object which cannot be deleted(will cause `DirectoryNotEmpty` error) if there is still objects in the directory.

### Steps to Reproduce

```rs
op.write_with("/path/to/obj", payload).await.unwrap();

op.remove_all("/").await.unwrap(); // this will return error
```

### Expected Behavior

No error.

### Additional Context

_No response_

### Are you willing to submit a PR to fix this bug?

- [ ] Yes, I would like to submit a PR.

Contributor guide

Open the contributing guide

Research direction

Start at the Operator::remove_all entry point and reproduce the issue with the provided Rust snippet against Huaweicloud OBS Parallel File System. Trace how the OBS directory object is handled during recursive deletion; done means removing the prefix containing /path/to/obj completes without a DirectoryNotEmpty error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.