feat(core): add conflict error kind - #8154
Merged
Merged
Conversation
Xuanwo
marked this pull request as ready for review
August 26, 2026 08:55
Xuanwo
requested review from
Zheaoli,
messense,
silver-ymz,
tisonkun and
xyjixyjixyji
as code owners
August 26, 2026 08:55
tisonkun
approved these changes
Aug 26, 2026
PsiACE
approved these changes
Aug 26, 2026
…lict-error # Conflicts: # core/services/azblob/src/deleter.rs # core/services/s3/src/core.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
Implements RFC #8145.
Rationale for this change
ConditionNotMatchcurrently combines failed OpenDAL conditions with provider-side resource-state conflicts. Those outcomes require different recovery, and retryability depends on the operation that received the error rather than the error kind alone.What changes are included in this PR?
ErrorKind::Conflictand narrow the publicConditionNotMatchand retry contracts.PutObjectconditional conflicts temporary while leaving multipart completion conflicts permanent because recovery requires a new upload session.if_not_existsand internal state-transition context.Conflictfrom the C, Go, Java, Python, .NET, Haskell, and Zig bindings without renumbering existing error values.Are there any user-facing changes?
Yes. Provider-side operation conflicts that were previously reported as
ConditionNotMatchnow useConflict. Existing OpenDAL conditions still useConditionNotMatch, and unconditional create-style collisions continue to useAlreadyExistswhere applicable. Retry status remains independent from the error kind.AI Usage Statement
AI materially assisted with implementation and test drafting. I reviewed the changes and verified them against the accepted RFC and current provider documentation. The provider mappings were not reproduced against live S3, GCS, or Azure Blob accounts. The Zig source was format-checked, but the local Zig build test was blocked by host macOS linker errors; the generated C API and Rust binding crates compile.