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


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataExecutionVisitor.java:
##########
@@ -234,7 +234,7 @@ public TSStatus visitInsertRows(InsertRowsNode node, 
DataRegion dataRegion) {
       }
       return firstStatus;
     } catch (SemanticException | TableLostRuntimeException e) {
-      LOGGER.error(DataNodeMiscMessages.ERROR_EXECUTING_PLAN_NODE_CAUSED, 
node, e.getMessage());
+      LOGGER.error(DataNodeMiscMessages.ERROR_EXECUTING_PLAN_NODE_CAUSED, 
node, e.getMessage(), e);

Review Comment:
   Updated in ee51b9b04c9. `SemanticException` and `TableLostRuntimeException` 
now log only the plan node and exception message. The regression tests verify 
that their original status codes/messages are preserved and no stack trace is 
logged.



##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataExecutionVisitor.java:
##########
@@ -347,7 +347,7 @@ public TSStatus visitDeleteData(DeleteDataNode node, 
DataRegion dataRegion) {
       return RpcUtils.getStatus(e.getErrorCode(), e.getMessage());
     } catch (IOException | IllegalPathException e) {
       LOGGER.error(DataNodeMiscMessages.ERROR_EXECUTING_PLAN_NODE, node, e);
-      return new TSStatus(TSStatusCode.WRITE_PROCESS_ERROR.getStatusCode());
+      return RpcUtils.getStatus(TSStatusCode.WRITE_PROCESS_ERROR, 
e.getMessage());

Review Comment:
   Updated in ee51b9b04c9. Split the catches so `IllegalPathException` logs 
only its message, while `IOException` still logs the stack trace. The 
`WRITE_PROCESS_ERROR` response still includes the original message. Regression 
tests cover both logging behaviors and write-lock release.



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