This is an automated email from the ASF dual-hosted git repository.

rong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 8c384da094c [IOTDB-6188] Load: Optimize the return of error codes 
related to user privileges (#11299)
8c384da094c is described below

commit 8c384da094c805e83a9a71a5e170b379b793236f
Author: Itami Sho <[email protected]>
AuthorDate: Fri Oct 13 10:50:27 2023 +0800

    [IOTDB-6188] Load: Optimize the return of error codes related to user 
privileges (#11299)
---
 .../iotdb/db/queryengine/plan/analyze/LoadTsfileAnalyzer.java | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/LoadTsfileAnalyzer.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/LoadTsfileAnalyzer.java
index 900b7a2d7d9..52776115030 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/LoadTsfileAnalyzer.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/LoadTsfileAnalyzer.java
@@ -58,6 +58,7 @@ import 
org.apache.iotdb.db.storageengine.dataregion.tsfile.TsFileResourceStatus;
 import org.apache.iotdb.db.utils.FileLoaderUtils;
 import org.apache.iotdb.db.utils.TimestampPrecisionUtils;
 import org.apache.iotdb.db.utils.constant.SqlConstant;
+import org.apache.iotdb.rpc.RpcUtils;
 import org.apache.iotdb.rpc.TSStatusCode;
 import org.apache.iotdb.tsfile.common.constant.TsFileConstant;
 import org.apache.iotdb.tsfile.file.metadata.TimeseriesMetadata;
@@ -149,7 +150,10 @@ public class LoadTsfileAnalyzer {
         throw new SemanticException(
             String.format("TsFile %s is empty or incomplete.", 
tsFile.getPath()));
       } catch (AuthException e) {
-        throw new RuntimeException(e);
+        Analysis analysis = new Analysis();
+        analysis.setFinishQueryAfterAnalyze(true);
+        analysis.setFailStatus(RpcUtils.getStatus(e.getCode(), 
e.getMessage()));
+        return analysis;
       } catch (Exception e) {
         LOGGER.warn(String.format("Parse file %s to resource error.", 
tsFile.getPath()), e);
         throw new SemanticException(
@@ -614,9 +618,10 @@ public class LoadTsfileAnalyzer {
           }
 
           // check compressor
-          if 
(!tsFileSchema.getCompressor().equals(iotdbSchema.getCompressor())) {
+          if (LOGGER.isDebugEnabled()
+              && 
!tsFileSchema.getCompressor().equals(iotdbSchema.getCompressor())) {
             // we allow a measurement to have different compressors in 
different chunks
-            LOGGER.warn(
+            LOGGER.debug(
                 "Compressor not match, measurement: {}{}{}, "
                     + "TsFile compressor: {}, IoTDB compressor: {}",
                 device,

Reply via email to