From 068fa8b54c9f4eee8eab6e06bc262b1350ffd43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cy?= <2725843507@qq.com> Date: Fri, 27 Sep 2024 09:39:33 +0800 Subject: [PATCH] add exception handler --- .../load/active/ActiveLoadTsFileLoader.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoader.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoader.java index b330eba45f69..2d26ea9de9d5 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoader.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/active/ActiveLoadTsFileLoader.java @@ -212,6 +212,11 @@ private void handleLoadFailure(final Pair filePair, final TSSta "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to memory constraints, will retry later.", filePair.getLeft(), filePair.getRight()); + } else if (status.getMessage() != null && status.getMessage().contains("read only")) { + LOGGER.info( + "Error occurred when loading tsfile {} (isGeneratedByPipe = {}) due to the system is read only", + filePair.getLeft(), + filePair.getRight()); } else { LOGGER.warn( "Failed to auto load tsfile {} (isGeneratedByPipe = {}), status: {}. File will be moved to fail directory.", @@ -236,6 +241,11 @@ private void handleOtherException(final Pair filePair, final Ex "Rejecting auto load tsfile {} (isGeneratedByPipe = {}) due to memory constraints, will retry later.", filePair.getLeft(), filePair.getRight()); + } else if (e.getMessage() != null && e.getMessage().contains("read only")) { + LOGGER.info( + "Error occurred when loading tsfile {} (isGeneratedByPipe = {}) due to the system is read only", + filePair.getLeft(), + filePair.getRight()); } else { LOGGER.warn( "Failed to auto load tsfile {} (isGeneratedByPipe = {}) because of an unexpected exception. File will be moved to fail directory.",