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

Open
#6,032 3 comments 3 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

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.

Description

enhancement services/obs
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
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.
Dominant language
Rust
Stars
5.5k
Forks
869
Avg merge
8h 2m
Merged PRs (30d)
862

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/opendal

All issues in apache/opendal

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.