Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.10.0
Description
Hi,
A user are using 0.10-SNAPSHOT and after a restart of IoTDB, the instance failed because of:
// code placeholder
java.lang.IllegalArgumentException: Negative position at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:712) at org.apache.iotdb.tsfile.read.reader.DefaultTsFileInput.read(DefaultTsFileInput.java:60) at org.apache.iotdb.tsfile.read.TsFileSequenceReader.readTailMagic(TsFileSequenceReader.java:203) at org.apache.iotdb.tsfile.read.TsFileSequenceReader.loadMetadataSize(TsFileSequenceReader.java:168) at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:103) at org.apache.iotdb.tsfile.read.TsFileSequenceReader.<init>(TsFileSequenceReader.java:85) at org.apache.iotdb.db.utils.UpgradeUtils.isNeedUpgrade(UpgradeUtils.java:62) at org.apache.iotdb.db.engine.storagegroup.StorageGroupProcessor.countUpgradeFiles(StorageGroupProcessor.java:1269) at org.apache.iotdb.db.engine.StorageEngine.countUpgradeFiles(StorageEngine.java:351) at org.apache.iotdb.db.service.UpgradeSevice.countUpgradeFiles(UpgradeSevice.java:107) at org.apache.iotdb.db.service.UpgradeSevice.start(UpgradeSevice.java:60) at org.apache.iotdb.db.service.RegisterManager.register(RegisterManager.java:48) at org.apache.iotdb.db.service.IoTDB.setUp(IoTDB.java:96) at org.apache.iotdb.db.service.IoTDB.active(IoTDB.java:69) at org.apache.iotdb.db.service.IoTDB.main(IoTDB.java:55)
- As IllegalArgumentException is not caught, the file name is not printed, which is not friendly for letting users find which file is broken.
- After I modify the codes, I find the "broken" file is a zero byte file. e.g.:
So, try to catch all exceptions to print the broken file name firstly, and skip and report incorrect files when checking these files (And I think this kind of files, i.e., 0-byte files, can be deleted)
Attachments
Attachments
Issue Links
- links to