Pipe: Fix stuck caused by async connector client not returned after transferring tsfiles & Fix validateTsFile and shouldMarkAsPipeRequest may not be effective (#15245)#15249
Conversation
…ransferring tsfiles & Fix validateTsFile and shouldMarkAsPipeRequest may not be effective (#15245)
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes an issue where the async connector client was not correctly returned to the pool after transferring tsfiles and addresses the ineffectiveness of validateTsFile and shouldMarkAsPipeRequest.
- Revised the client handling logic to ensure its return using a dedicated method.
- Enhanced error logging with detailed event counts in the retry exception.
- Updated the receiverAttributes format in the client manager to include additional attributes.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| PipeTransferTsFileHandler.java | Consolidated client return logic via returnClientIfNecessary and added null checks. |
| IoTDBDataRegionAsyncConnector.java | Updated exception message with additional details on failed retry events. |
| IoTDBDataNodeAsyncClientManager.java | Extended receiverAttributes format to include validateTsFile and shouldMarkAsPipeRequest. |
Comments suppressed due to low confidence (2)
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/protocol/thrift/async/handler/PipeTransferTsFileHandler.java:416
- The returnClientIfNecessary method sets the client to null after returning it, which could lead to race conditions if accessed concurrently. Consider synchronizing this method to ensure thread-safety when modifying the client field.
private void returnClientIfNecessary() {
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/protocol/thrift/async/IoTDBDataRegionAsyncConnector.java:528
- [nitpick] The enriched exception message now includes specific details about the remaining events. Verify that this detailed message does not inadvertently expose sensitive information and remains clear for end users.
throw new PipeException(
...src/main/java/org/apache/iotdb/db/pipe/connector/client/IoTDBDataNodeAsyncClientManager.java
Show resolved
Hide resolved
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #15249 +/- ##
============================================
- Coverage 39.40% 39.40% -0.01%
Complexity 193 193
============================================
Files 4624 4624
Lines 297787 297808 +21
Branches 37174 37176 +2
============================================
- Hits 117347 117344 -3
- Misses 180440 180464 +24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|




No description provided.