diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java index 588b0e025151..d2c1d2a783a9 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java @@ -20,6 +20,7 @@ package org.apache.iotdb.db.queryengine.plan.statement.crud; import org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot; +import org.apache.iotdb.commons.conf.CommonDescriptor; import org.apache.iotdb.commons.exception.MetadataException; import org.apache.iotdb.commons.path.PartialPath; import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory; @@ -702,11 +703,15 @@ protected void subRemoveAttributeColumns(List columnsToKeep) { @Override public String toString() { + final int size = CommonDescriptor.getInstance().getConfig().getPathLogMaxSize(); return "InsertTabletStatement{" + "deviceIDs=" + Arrays.toString(deviceIDs) + ", measurements=" - + Arrays.toString(measurements) + + Arrays.toString( + Objects.nonNull(measurements) && measurements.length > size + ? Arrays.copyOf(measurements, size) + : measurements) + ", rowCount=" + rowCount + ", timeRange=[" diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/receiver/PipeReceiverStatusHandler.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/receiver/PipeReceiverStatusHandler.java index 886d387f60c8..fb997d0b14a9 100644 --- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/receiver/PipeReceiverStatusHandler.java +++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/receiver/PipeReceiverStatusHandler.java @@ -35,6 +35,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.Nullable; + import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -106,7 +108,7 @@ public void handle( */ public void handle( final TSStatus status, - final String exceptionMessage, + final @Nullable String exceptionMessage, final String recordMessage, final boolean log4NoPrivileges) { @@ -206,7 +208,7 @@ public void handle( break; default: // Some auth error may be wrapped in other codes - if (exceptionMessage.contains(NO_PERMISSION_STR)) { + if (Objects.nonNull(exceptionMessage) && exceptionMessage.contains(NO_PERMISSION_STR)) { if (skipIfNoPrivileges) { if (log4NoPrivileges && LOGGER.isWarnEnabled()) { LOGGER.warn(