Caideyipi opened a new pull request, #18145: URL: https://github.com/apache/iotdb/pull/18145
## Summary This PR prevents `DROP PIPE` from getting stuck when an external sink connector blocks during connection retry or close. Changes: - Do not hold the sink subtask monitor while retrying `handshake()` after `PipeConnectionException`. - Make sink connector `close()` bounded by a timeout during drop, so drop can continue if the connector close blocks. - Use bounded write-lock acquisition for single pipe meta push and drop handling, consistent with full pipe meta push. - Add regression tests for drop/discard not being blocked by connection retry and connector close not waiting forever. ## Positive effects - `DROP PIPE` is no longer blocked indefinitely by a sink connector stuck in external network operations such as MQTT/Paho connect or publish retry. - DataNode internal RPC/procedure worker threads are less likely to be held forever by pipe cleanup. - Pipe task agent write-lock waits during single meta push/drop become bounded, so ConfigNode can observe a timeout and rely on later metadata synchronization instead of waiting indefinitely. - Existing event discard logic can proceed while the failed sink retry is still waiting on the external system. ## Potential negative effects - `handshake()` can now run concurrently with drop/discard/close paths. Connector implementations that are not thread-safe may surface connector-side exceptions or logs during shutdown. - If a connector `close()` does not return before the timeout, the close operation continues in a daemon thread and resource release may be delayed. - Timed write-lock acquisition may return a pipe meta push/drop timeout under heavy contention; this trades indefinite blocking for fail-fast behavior and relies on later pipe meta synchronization. - Interrupting a blocked connector close is best-effort only; connectors that ignore interruption may keep their daemon close thread alive until the external call returns. ## Tests - `mvn spotless:apply -pl iotdb-core/node-commons,iotdb-core/datanode` - `git diff --check` - `git diff --cached --check` - `mvn -pl iotdb-core/datanode -DskipTests compile` - Attempted `mvn -pl iotdb-core/datanode -Dtest=PipeSinkSubtaskTest test`, but local JVM native memory OOM occurred during `testCompile` before the final test run could execute. -- 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]
