You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "TennyZhuang (via GitHub)" <gi...@apache.org> on 2026/04/17 08:10:00 UTC
[PR] fix(core): use index-based tracking in BatchDeleter to fix progress stalls [opendal]
TennyZhuang opened a new pull request, #7401:
URL: https://github.com/apache/opendal/pull/7401
## Which issue does this PR close?
N/A (bug found through code analysis and deterministic testing)
## Rationale
`BatchDeleter` previously used a `HashSet<(String, OpDelete)>` to track pending deletions and relied on `OpDelete` equality (which derives `Hash`/`Eq` over both `version` and `recursive` fields) to remove completed items via `buffer.remove()`.
However, services like S3 and OSS reconstruct `OpDelete` from XML response data without preserving all original fields — for example, `recursive` always defaults to `false` in the reconstructed `OpDelete`. This causes `buffer.remove()` to silently fail when the original `OpDelete` had `recursive: true`, leaving items permanently stuck in the buffer and eventually triggering the "no progress" error in `close()`.
## Changes
- Changed `BatchDeleteResult` from `(String, OpDelete)` tuples to index-based tracking (`Vec<usize>` for succeeded, `Vec<(usize, Error)>` for failed), referencing positions in the input `batch` Vec
- Changed `BatchDeleter.buffer` from `HashSet` to `Vec`, removing the dependency on `OpDelete` `Hash`/`Eq`
- Updated all 8 service `delete_batch` implementations (S3, OSS, GCS, Azblob, Swift, HF, Cloudflare-KV, object_store) to report results by index
- Added regression tests verifying index-based progress tracking and partial failure retry
## Are there any user-facing changes?
No. `BatchDeleteResult` is an internal type in `raw::oio` — not part of the public user API.
---
This PR was generated with the assistance of an LLM (Claude Opus 4.6) as a coding tool.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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
Re: [PR] fix(core): use index-based tracking in BatchDeleter to fix progress stalls [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed pull request #7401: fix(core): use index-based tracking in BatchDeleter to fix progress stalls
URL: https://github.com/apache/opendal/pull/7401
--
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