Caideyipi opened a new pull request, #18381:
URL: https://github.com/apache/iotdb/pull/18381
## Description
### Handle transient resource failures locally
- Add `PipeStopStrategy.accept(Exception, TSStatus)` as the shared decision
point for sink failures.
- Treat nested client-pool borrow failures, local Pipe memory allocation
failures, and temporary receiver unavailability as transient resource failures.
- Retry these failures locally without reporting a critical runtime
exception or stopping the Pipe.
- Preserve nested causes in the IoTConsensusV2 sync sink so client-pool
failures remain classifiable.
### Expose recent resource failures
- Track failures per Pipe in a fixed one-minute rolling window using bounded
one-second buckets.
- Report per-node snapshots through optional Thrift heartbeat fields and
aggregate them on the ConfigNode.
- Expire stale node snapshots after one minute.
- Add `RecentFailures` to tree-model `SHOW PIPES` and `recent_failures` to
`information_schema.pipes`.
- Render values deterministically, for example `{memory_timeout=15,
network_timeout=10}`, and render `{}` when empty.
### Compatibility and verification
The new Thrift fields are optional, so mixed-version heartbeats and
show-pipe responses continue to parse without them.
Verified with:
- 9 focused node-commons tests
- 10 focused DataNode tests
- 17 focused ConfigNode tests
- DataNode, ConfigNode, and node-commons test compilation for both English
and Chinese locales
- clean installation of the modified Thrift modules
- Spotless, Checkstyle, and `git diff --check`
The updated `IoTDBDatabaseIT` assertion was compiled. Its targeted execution
was attempted, but the reactor was stopped before reaching the integration test
by host Windows page-file exhaustion in an unrelated upstream test module.
<hr>
This PR has:
- [x] been self-reviewed.
- [x] concurrent read
- [x] concurrent write
- [x] concurrent read and write
- [x] added comments explaining the why and the intent of the code wherever
it would not be obvious.
- [x] added unit tests or modified existing tests to cover new code paths.
<hr>
##### Key changed/added classes (or packages if there are too many classes)
in this PR
- `PipeStopStrategy`
- `PipeRecentFailureCounter`
- `PipeAbstractSinkSubtask`
- `IoTDBDataRegionAsyncSink`
- `PipeTemporaryMetaInAgent` / `PipeTemporaryMetaInCoordinator`
- Pipe heartbeat and `SHOW PIPES` response paths
--
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]