This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/dev/1.3 by this push:
new 1fa468f39a0 [To dev/1.3] Load: Fixed an issue where premature
persistence of TSFileResource caused incorrect configuration to be not saved
(#16703)
1fa468f39a0 is described below
commit 1fa468f39a0fe046a022760c75233d94b087f16f
Author: Zhenyu Luo <[email protected]>
AuthorDate: Fri Nov 7 11:15:42 2025 +0800
[To dev/1.3] Load: Fixed an issue where premature persistence of
TSFileResource caused incorrect configuration to be not saved (#16703)
* Active Load: Ignore java.io.UncheckedIOException exceptions thrown during
the file scanning process.
* update
---
.../dataregion/tsfile/TsFileResource.java | 29 ++++++++--------------
1 file changed, 10 insertions(+), 19 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java
index 1b4b32b1283..be9012780d9 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileResource.java
@@ -253,21 +253,16 @@ public class TsFileResource {
ReadWriteIOUtils.write(maxPlanIndex, outputStream);
ReadWriteIOUtils.write(minPlanIndex, outputStream);
- if (modFile != null && modFile.exists()) {
- String modFileName = new File(modFile.getFilePath()).getName();
- ReadWriteIOUtils.write(modFileName, outputStream);
- } else {
- // make the first "inputStream.available() > 0" in deserialize() happy.
- //
- // if modFile not exist, write null (-1). the first
"inputStream.available() > 0" in
- // deserialize() and deserializeFromOldFile() detect -1 and deserialize
modFileName as null
- // and skip the modFile deserialize.
- //
- // this make sure the first and the second "inputStream.available() > 0"
in deserialize()
- // will always be called... which is a bit ugly but allows the following
variable
- // maxProgressIndex to be deserialized correctly.
- ReadWriteIOUtils.write((String) null, outputStream);
- }
+ // make the first "inputStream.available() > 0" in deserialize() happy.
+ //
+ // if modFile not exist, write null (-1). the first
"inputStream.available() > 0" in
+ // deserialize() and deserializeFromOldFile() detect -1 and deserialize
modFileName as null
+ // and skip the modFile deserialize.
+ //
+ // this make sure the first and the second "inputStream.available() > 0"
in deserialize()
+ // will always be called... which is a bit ugly but allows the following
variable
+ // maxProgressIndex to be deserialized correctly.
+ ReadWriteIOUtils.write((String) null, outputStream);
if (maxProgressIndex.get() != null) {
TsFileResourceBlockType.PROGRESS_INDEX.serialize(outputStream);
@@ -292,10 +287,6 @@ public class TsFileResource {
if (inputStream.available() > 0) {
String modFileName = ReadWriteIOUtils.readString(inputStream);
- if (modFileName != null) {
- File modF = new File(file.getParentFile(), modFileName);
- modFile = new ModificationFile(modF.getPath());
- }
}
while (inputStream.available() > 0) {