feat(services/azblob): implement "undelete" operation in azblob #7178
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Subtask of ##4321. This PR also suggests a certain design for currently non-existing undelete API (massively inspired by existing API for
deletethough).Rationale for this change
I'll add my 2 cents here. Iceberg Rust FileIO is powered by OpenDAL, which makes OpenDAL an important piece of the whole Iceberg infrastructure. There are known bugs in Iceberg causing involuntary file deletion. In order to secure our pipelines, currently our team has to maintain implementations of this logic on several languages. Ideally we would like to have a file restore (and later also full table restore) functionality available downstream.
What changes are included in this PR?
Core Changes:
Layer APIs:
semaphore.acquire(core/layers/concurrent-limit/src/lib.rs)NB: I checked all 20 layers that implement LayeredAccess. The others don't need explicit implementations because:
Concrete Azure Blob Storage Implementation:
Testing:
- Creates a file
- Deletes it (soft delete)
- Restores it using undelete
- Verifies the content is intact
- Exits early for filesystems that don't support undelete (Capability check)
Are there any user-facing changes?
New feature:
op.undelete(&file_path)for Azblob when soft deletes are enabled.AI Usage Statement
Claude Code with its default model (Claude Sonet)