Mola-maker opened a new pull request, #9040:
URL: https://github.com/apache/opendal/pull/9040

   # Which issue does this PR close?
   
   Closes #9039.
   
   # Rationale for this change
   
   `new_std_io_error` marks every `io::ErrorKind` it does not list explicitly 
as a temporary `Unexpected` error. #8984 fixed this for `IsADirectory` and 
`NotADirectory`, but several other permanent kinds still fall through to the 
temporary branch. `RetryLayer` then retries each of them until its budget runs 
out. In the issue's repro, a write to an invalid file name and a delete of a 
non-empty directory each take about 7 s with `RetryLayer::with_max_times(3)`.
   
   # What changes are included in this PR?
   
   - `DirectoryNotEmpty`, `InvalidFilename`, `FileTooLarge`, `NotSeekable`, 
`CrossesDevices` and `TooManyLinks` now map to a permanent 
`ErrorKind::Unexpected`. The error kind is unchanged. These errors are no 
longer marked temporary.
   - These kinds stay retryable on purpose, and a comment says why:
     - `ReadOnlyFilesystem`: libhdfs reports NameNode `SafeModeException` as 
`EROFS`, and safe mode clears.
     - `InvalidInput`: tokio returns it when DNS resolves a host to no 
addresses.
   - New tests cover both lists.
   
   Verification (Windows 11, rustc 1.99.1):
   
   - `cargo test -p opendal-core --lib`: 517 passed. The new permanent-kinds 
test fails against the old mapping.
   - `cargo test -p opendal-layer-retry --lib`: 45 passed.
   - `cargo clippy -p opendal-core --all-targets -- -D warnings`: clean for the 
Windows host and for `--target x86_64-unknown-linux-gnu`.
   - The issue's repro with `RetryLayer::with_max_times(3)` fails in under 1 ms 
for both cases, down from about 7 s.
   
   # Are there any user-facing changes?
   
   Errors of the six kinds above are no longer marked temporary, so 
`RetryLayer` returns them right away.
   
   # Breaking changes
   
   # AI Usage Statement
   
   - Harness: Claude Code
   - Model: Anthropic Claude
   - Effort: default
   - Role: Found the issue with a differential harness over local services, 
wrote the fix and the tests, and ran the checks above. A separate review pass 
found that `ReadOnlyFilesystem` (HDFS safe mode) and `InvalidInput` (empty DNS 
results) can be transient, so both were taken out of the permanent list.
   
   🤖 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to