This is an automated email from the ASF dual-hosted git repository. haonan pushed a commit to branch fix_sync_object_node_error_log in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit b04bfaa6e7f2d2bc09b838916cd518f130679763 Author: HTHou <[email protected]> AuthorDate: Mon Dec 22 10:14:08 2025 +0800 Fix sync objectNode error log --- .../db/queryengine/plan/planner/plan/node/write/ObjectNode.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/ObjectNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/ObjectNode.java index 4ec37e46bf2..b7729769295 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/ObjectNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/ObjectNode.java @@ -255,6 +255,7 @@ public class ObjectNode extends SearchNode implements WALEntryValue { ReadWriteIOUtils.write(getType().getNodeType(), stream); byte[] contents = new byte[contentLength]; boolean readSuccess = false; + IOException ioException = null; for (int i = 0; i < 2; i++) { Optional<File> objectFile = TierManager.getInstance().getAbsoluteObjectFilePath(filePath.toString()); @@ -263,7 +264,7 @@ public class ObjectNode extends SearchNode implements WALEntryValue { readContentFromFile(objectFile.get(), contents); readSuccess = true; } catch (IOException e) { - LOGGER.error("Error when read object file {}.", objectFile.get(), e); + ioException = e; } if (readSuccess) { break; @@ -276,13 +277,16 @@ public class ObjectNode extends SearchNode implements WALEntryValue { readContentFromFile(objectTmpFile.get(), contents); readSuccess = true; } catch (IOException e) { - LOGGER.error("Error when read tmp object file {}.", objectTmpFile.get(), e); + ioException = e; } if (readSuccess) { break; } } } + if (!readSuccess) { + LOGGER.error("Error when read tmp object file {}.", filePath.toString(), ioException); + } ReadWriteIOUtils.write(readSuccess && isEOF, stream); ReadWriteIOUtils.write(offset, stream); filePath.serialize(stream);
