jt2594838 opened a new pull request, #18317:
URL: https://github.com/apache/iotdb/pull/18317
## Description
### Fix interrupted follower SyncLog handling
- Remove an interrupted request from `SyncLogCacheQueue` instead of applying
it unconditionally.
- Preserve the thread interrupt flag and return an `INTERNAL_SERVER_ERROR`
status with a clear message so the leader can retry.
### Retry `WRITE_PROCESS_ERROR`
- Treat `WRITE_PROCESS_ERROR` as retriable in `RetryUtils.needRetryForWrite`.
- This covers SyncLog statuses produced by transient follower write failures
such as IO failures in delete, WAL, MemTable, or TsFileProcessor paths.
### Tests
- Added coverage ensuring interrupted SyncLog requests are not applied.
- Added coverage ensuring a follower `WRITE_PROCESS_ERROR` causes the leader
to retry and eventually apply the request.
- Added direct unit coverage for the retry-status classification.
- Verified with:
- `mvn test -pl iotdb-core/consensus -am
-Dtest=RetryUtilsTest,ReplicateTest#syncLogWriteProcessErrorTriggersLeaderRetryTest
-Dsurefire.failIfNoSpecifiedTests=false`
- `mvn test -pl iotdb-core/consensus
-Dtest=ReplicateTest#syncLogInterruptedWhileWaitingTest`
- Chinese locale test compilation for the consensus module.
<hr>
This PR has:
- [x] been self-reviewed.
- [x] concurrent write
- [x] added comments explaining the intent of the code.
- [x] added unit tests or modified existing tests to cover new code paths.
<hr>
##### Key changed/added classes
- `IoTConsensusServerImpl`
- `RetryUtils`
- `ReplicateTest`
- `RetryUtilsTest`
--
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]