Caideyipi commented on code in PR #18297:
URL: https://github.com/apache/iotdb/pull/18297#discussion_r3654812892


##########
iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ProcedureMessages.java:
##########
@@ -1408,4 +1408,28 @@ private ProcedureMessages() {}
   public static final String 
MESSAGE_UNEXPECTED_DATAPARTITIONTABLEINTEGRITYCHECKPROCEDURESTATE_ARG_WHEN_SHOWING_PROGRESS_D3C07BA1
 =
       "Unexpected DataPartitionTableIntegrityCheckProcedureState {} when 
showing progress";
 
+  public static final String 
MESSAGE_NO_PROCEDURE_WORKER_IS_CURRENTLY_AVAILABLE_WORKERS_MAY_BE_BUSY_OR_BLOCKED_BY_OTHER_PROCEDURES_AB0B1595
 =
+      "no Procedure worker is currently available; workers may be busy or 
blocked by other procedures.";
+  public static final String 
MESSAGE_PIPE_OPERATION_ARG_TIMED_OUT_PROCEDUREID_ARG_STUCK_AT_ARG_REASON_ARG_THE_PROCEDURE_IS_STILL_RUNNING_7EEAC50E
 =
+      "Pipe operation %s timed out (procedureId=%d). Stuck at %s. Reason: %s. 
The procedure is still running.";
+  public static final String 
MESSAGE_WAITING_TO_ACQUIRE_THE_PIPETASKCOORDINATOR_LOCK_BECAUSE_ANOTHER_PIPE_OPERATION_IS_HOLDING_IT_25A3B6B8
 =
+      "waiting to acquire the PipeTaskCoordinator lock because another Pipe 
operation is holding it.";
+  public static final String 
MESSAGE_WAITING_TO_ACQUIRE_THE_CONFIGNODE_NODE_LOCK_BECAUSE_ANOTHER_NODE_PROCEDURE_IS_HOLDING_IT_56494E86
 =
+      "waiting to acquire the ConfigNode node lock because another node 
procedure is holding it.";

Review Comment:
   Thanks. The timeout diagnostic now reports the node-lock owner as the Pipe 
operation (or the procedure class for non-Pipe procedures), together with its 
procedureId. Implemented in 868007947d2.



##########
iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ProcedureMessages.java:
##########
@@ -1408,4 +1408,28 @@ private ProcedureMessages() {}
   public static final String 
MESSAGE_UNEXPECTED_DATAPARTITIONTABLEINTEGRITYCHECKPROCEDURESTATE_ARG_WHEN_SHOWING_PROGRESS_D3C07BA1
 =
       "Unexpected DataPartitionTableIntegrityCheckProcedureState {} when 
showing progress";
 
+  public static final String 
MESSAGE_NO_PROCEDURE_WORKER_IS_CURRENTLY_AVAILABLE_WORKERS_MAY_BE_BUSY_OR_BLOCKED_BY_OTHER_PROCEDURES_AB0B1595
 =
+      "no Procedure worker is currently available; workers may be busy or 
blocked by other procedures.";
+  public static final String 
MESSAGE_PIPE_OPERATION_ARG_TIMED_OUT_PROCEDUREID_ARG_STUCK_AT_ARG_REASON_ARG_THE_PROCEDURE_IS_STILL_RUNNING_7EEAC50E
 =
+      "Pipe operation %s timed out (procedureId=%d). Stuck at %s. Reason: %s. 
The procedure is still running.";
+  public static final String 
MESSAGE_WAITING_TO_ACQUIRE_THE_PIPETASKCOORDINATOR_LOCK_BECAUSE_ANOTHER_PIPE_OPERATION_IS_HOLDING_IT_25A3B6B8
 =
+      "waiting to acquire the PipeTaskCoordinator lock because another Pipe 
operation is holding it.";
+  public static final String 
MESSAGE_WAITING_TO_ACQUIRE_THE_CONFIGNODE_NODE_LOCK_BECAUSE_ANOTHER_NODE_PROCEDURE_IS_HOLDING_IT_56494E86
 =
+      "waiting to acquire the ConfigNode node lock because another node 
procedure is holding it.";
+  public static final String 
MESSAGE_PIPE_REQUEST_OR_PLUGIN_VALIDATION_HAS_NOT_COMPLETED_A_PLUGIN_CHECK_OR_METADATA_ACCESS_MAY_BE_SLOW_57C36CEF
 =
+      "Pipe request or plugin validation has not completed; a plugin check or 
metadata access may be slow.";
+  public static final String 
MESSAGE_PIPE_METADATA_CALCULATION_HAS_NOT_COMPLETED_METADATA_ACCESS_OR_LOCAL_CALCULATION_MAY_BE_SLOW_DEBF2504
 =
+      "Pipe metadata calculation has not completed; metadata access or local 
calculation may be slow.";
+  public static final String 
MESSAGE_THE_CONFIGNODE_CONSENSUS_WRITE_HAS_NOT_RETURNED_THE_CONSENSUS_GROUP_MAY_BE_UNAVAILABLE_OR_SLOW_F8911CE7
 =
+      "the ConfigNode consensus write has not returned; the consensus group 
may be unavailable or slow.";

Review Comment:
   Thanks. Added a suggestion to run SHOW CLUSTER when the ConfigNode consensus 
write times out. Implemented in 868007947d2.



##########
iotdb-core/confignode/src/main/i18n/en/org/apache/iotdb/confignode/i18n/ProcedureMessages.java:
##########
@@ -1408,4 +1408,28 @@ private ProcedureMessages() {}
   public static final String 
MESSAGE_UNEXPECTED_DATAPARTITIONTABLEINTEGRITYCHECKPROCEDURESTATE_ARG_WHEN_SHOWING_PROGRESS_D3C07BA1
 =
       "Unexpected DataPartitionTableIntegrityCheckProcedureState {} when 
showing progress";
 
+  public static final String 
MESSAGE_NO_PROCEDURE_WORKER_IS_CURRENTLY_AVAILABLE_WORKERS_MAY_BE_BUSY_OR_BLOCKED_BY_OTHER_PROCEDURES_AB0B1595
 =
+      "no Procedure worker is currently available; workers may be busy or 
blocked by other procedures.";
+  public static final String 
MESSAGE_PIPE_OPERATION_ARG_TIMED_OUT_PROCEDUREID_ARG_STUCK_AT_ARG_REASON_ARG_THE_PROCEDURE_IS_STILL_RUNNING_7EEAC50E
 =
+      "Pipe operation %s timed out (procedureId=%d). Stuck at %s. Reason: %s. 
The procedure is still running.";
+  public static final String 
MESSAGE_WAITING_TO_ACQUIRE_THE_PIPETASKCOORDINATOR_LOCK_BECAUSE_ANOTHER_PIPE_OPERATION_IS_HOLDING_IT_25A3B6B8
 =
+      "waiting to acquire the PipeTaskCoordinator lock because another Pipe 
operation is holding it.";
+  public static final String 
MESSAGE_WAITING_TO_ACQUIRE_THE_CONFIGNODE_NODE_LOCK_BECAUSE_ANOTHER_NODE_PROCEDURE_IS_HOLDING_IT_56494E86
 =
+      "waiting to acquire the ConfigNode node lock because another node 
procedure is holding it.";
+  public static final String 
MESSAGE_PIPE_REQUEST_OR_PLUGIN_VALIDATION_HAS_NOT_COMPLETED_A_PLUGIN_CHECK_OR_METADATA_ACCESS_MAY_BE_SLOW_57C36CEF
 =
+      "Pipe request or plugin validation has not completed; a plugin check or 
metadata access may be slow.";
+  public static final String 
MESSAGE_PIPE_METADATA_CALCULATION_HAS_NOT_COMPLETED_METADATA_ACCESS_OR_LOCAL_CALCULATION_MAY_BE_SLOW_DEBF2504
 =
+      "Pipe metadata calculation has not completed; metadata access or local 
calculation may be slow.";
+  public static final String 
MESSAGE_THE_CONFIGNODE_CONSENSUS_WRITE_HAS_NOT_RETURNED_THE_CONSENSUS_GROUP_MAY_BE_UNAVAILABLE_OR_SLOW_F8911CE7
 =
+      "the ConfigNode consensus write has not returned; the consensus group 
may be unavailable or slow.";
+  public static final String 
MESSAGE_ONE_OR_MORE_DATANODES_HAVE_NOT_RESPONDED_TO_THE_PIPE_METADATA_PUSH_THEY_MAY_BE_UNAVAILABLE_OR_SLOW_11BBB333
 =
+      "one or more DataNodes have not responded to the Pipe metadata push; 
they may be unavailable or slow.";

Review Comment:
   Thanks. Pipe metadata RPCs now expose a live set of pending DataNode IDs, 
and the timeout diagnostic reports the sorted unresolved IDs and suggests SHOW 
CLUSTER. Implemented in 868007947d2.



##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java:
##########
@@ -2266,6 +2267,13 @@ private static String 
wrapTimeoutMessageForPipeProcedure(String message) {
     return message;
   }
 
+  private static String wrapTimeoutMessageForPipeProcedure(
+      final String message, final AbstractOperatePipeProcedureV2 procedure) {
+    return PROCEDURE_TIMEOUT_MESSAGE.equals(message)
+        ? procedure.getTimeoutDiagnosticMessage()
+        : message;
+  }

Review Comment:
   Done. Procedure wait timeouts now use INTERNAL_REQUEST_TIME_OUT, and timeout 
handling compares the status code instead of the message text. Implemented in 
868007947d2.



##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/pipe/PipeTaskInfo.java:
##########
@@ -224,7 +224,9 @@ public void checkAndUpdateRequestBeforeAlterPipe(final 
TAlterPipeReq alterPipeRe
 
   private void checkAndUpdateRequestBeforeAlterPipeInternal(final 
TAlterPipeReq alterPipeRequest)
       throws PipeException {
-    if (!isPipeExisted(alterPipeRequest.getPipeName(), 
alterPipeRequest.isTableModel)) {
+    if (!isPipeExisted(alterPipeRequest.getPipeName(), 
alterPipeRequest.isTableModel)
+        || PipeStatus.PRE_DELETE.equals(
+            getPipeStatus(alterPipeRequest.getPipeName(), 
alterPipeRequest.isTableModel))) {
       final String exceptionMessage =
           String.format(
               "Failed to alter pipe %s, %s", alterPipeRequest.getPipeName(), 
PIPE_NOT_EXIST_MSG);

Review Comment:
   Done. ALTER, START, and STOP now distinguish a nonexistent or already 
dropped Pipe from a Pipe in PRE_DELETE, and the new user-facing messages are 
defined in both English and Chinese i18n sources. Implemented in 868007947d2.



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