Xuanwo opened a new pull request, #9064: URL: https://github.com/apache/opendal/pull/9064
# Which issue does this PR close? Related to #8254. # Rationale for this change If `InputStream.transferTo` fails while reading the source, try-with-resources still closes the destination stream. That close can publish the prefix already transferred. A caller that detects the source failure needs a way to abandon the write before leaving the resource block. # What changes are included in this PR? Rust `blocking::Writer::abort()` forwards to the existing asynchronous abort. Once abort starts, the shared writer state rejects writes and close, including small writes that would otherwise fit in its local chunk buffer. A regression test exercises a one-byte write after abort. Java `OperatorOutputStream.abort()` skips the buffered flush, requests backend cleanup, and releases the native handle even if cleanup fails. The following automatic `close()` is a no-op. The Java guide shows how to abort inside the catch block, suppress a cleanup failure on the original exception, and rethrow the original exception. A local MinIO probe exercised `transferTo` with `IOException` and `CancellationException`, each against an existing and an absent destination. All eight control and abort cases confirmed one active multipart upload at the point of failure. Ordinary close published the 11,534,373-byte prefix. With explicit abort, the original bytes or the absence of a target were preserved. Both paths ended with zero active uploads. An unstaged Fs write separately exercised a cleanup error reported as suppressed on the original cancellation exception. # Are there any user-facing changes? **Added:** Rust blocking writers and Java operator output streams can explicitly abort an unfinished write. Cleanup is service-dependent. Already visible bytes may remain, and a backend can report a cleanup error. Callers that use ordinary close retain its existing commit behavior. # Breaking changes # AI Usage Statement - Pi, `magpie/codex/gpt-6.2-sol`, xhigh: implementation, tests and MinIO verification. - Pi, `magpie/codex/gpt-6.2-astra`, high: design, coordination, review fixes and verification, with independent review in separate agents. - Pi, `magpie/agy-cli/gemini-4-neon`, high: PR title and description. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
