SteveYurongSu commented on code in PR #14324:
URL: https://github.com/apache/iotdb/pull/14324#discussion_r1872475872


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/protocol/thrift/async/IoTDBDataRegionAsyncConnector.java:
##########
@@ -543,12 +549,24 @@ public synchronized void close() {
     isClosed.set(true);
 
     retryConnector.close();
-    clearRetryEventsReferenceCount();
 
     if (tabletBatchBuilder != null) {
       tabletBatchBuilder.close();
     }
 
+    // ensure all on-the-fly requests have been handled
+    while (hasPendingRequests()) {
+      try {
+        Thread.sleep(50);
+      } catch (final InterruptedException e) {
+        LOGGER.warn(
+            "Interrupted when connector {} waiting for handling pending 
requests, remaining {} pending requests",

Review Comment:
   the pipe subtask ID



-- 
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