Repository navigation
Preserve write-path causes and return delete failure details - #18933
Conversation
| } 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); |
There was a problem hiding this comment.
These two exceptions are generally self-explanatory, no need to record the stack.
There was a problem hiding this comment.
Updated in ee51b9b. 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.
| } 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()); |
There was a problem hiding this comment.
No need to record the stack for IllegalPathException.
There was a problem hiding this comment.
Updated in ee51b9b. 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.
Description
Failed write-path operations can lose the details needed to diagnose them: several handlers log only the exception message, and DELETE error responses discard the message entirely.
Preserve the original exceptions and nested causes in ConfigNode table-schema lookup, WAL metadata reads and recovery, and file-time-index cache I/O logs. Also correct the WAL recovery warning to report the WAL node directory name.
For tree-model and table-model DELETE failures, return the original exception message alongside the existing
WRITE_PROCESS_ERROR(605) status. This lets clients see why deletion failed, including existing localized exception messages, while preserving the status codes and retry behavior.Keep message-only logging for self-explanatory
SemanticException,TableLostRuntimeException, andIllegalPathExceptionfailures, while retaining stack traces for I/O failures.Regression tests cover message-only logging and returned status for batch-insert semantic and table-loss failures, message-only logging for illegal-path DELETE failures, retained I/O failure stack traces, and failure messages for ordinary tree deletes, direct whole-database tree deletes, and table deletes.
Validation
mvn -nsu spotless:apply -pl iotdb-core/datanodemvn -nsu test-compile -DskipTests(English; all 53 modules passed)mvn -nsu surefire:test -pl iotdb-core/datanode -am -Dtest=DataExecutionVisitorTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false(English; 6 tests passed)mvn -nsu test-compile -DskipTests -P with-zh-locale(Chinese; all 53 modules passed)mvn -nsu surefire:test -pl iotdb-core/datanode -am -P with-zh-locale -Dtest=DataExecutionVisitorTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false(Chinese; 6 tests passed)Both full test compilations used a 1 GiB Maven heap.