You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by "Jialin Qiao (Jira)" <ji...@apache.org> on 2020/02/26 02:51:00 UTC
[jira] [Closed] (IOTDB-470) Startup failed when there are 0 byte
size TsFiles
[ https://issues.apache.org/jira/browse/IOTDB-470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jialin Qiao closed IOTDB-470.
-----------------------------
Fix Version/s: 0.10.0-SNAPSHOT
Resolution: Fixed
> Startup failed when there are 0 byte size TsFiles
> --------------------------------------------------
>
> Key: IOTDB-470
> URL: https://issues.apache.org/jira/browse/IOTDB-470
> Project: Apache IoTDB
> Issue Type: Bug
> Components: Others
> Affects Versions: 0.10.0-SNAPSHOT
> Reporter: Xiangdong Huang
> Assignee: EJTTianyu
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.10.0-SNAPSHOT
>
> Attachments: image-2020-02-10-19-54-46-410.png
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Hi,
> A user are using 0.10-SNAPSHOT and after a restart of IoTDB, the instance failed because of:
>
>
> {code:java}
> // 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)
> {code}
>
>
> # 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.:
> !image-2020-02-10-19-54-46-410.png!
>
> 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)
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)