apache / apache/iotdb

[Bug] docker compose down关闭之后无法启动,必须手动移除tsfile

オープン
#18,203 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
6.4k
フォーク
1.2k
平均マージ
1日 23時間
マージ済み PR(30日)
115

説明

### Search before asking

- [x] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.

### Version

版本2.0.8,docker部署

### Describe the bug and provide the minimal reproduce step

docker compose关闭服务,再启动时直接报错:
Aborting due to java.lang.OutOfMemoryError: Java heap space # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (debug.cpp:362), pid=7, tid=468 # fatal error: OutOfMemory encountered: Java heap space # # JRE version: OpenJDK Runtime Environment Temurin-17.0.15+6 (17.0.15+6) (build 17.0.15+6) # Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.15+6 (17.0.15+6, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %d" (or dumping to /iotdb/sbin/core.7) # # An error report file with more information is saved as: # /iotdb/sbin/hs_err_pid7.log 2026-07-14 08:51:04,653 [pool-39-IoTDB-TsFile-Recover-2] INFO o.a.i.d.s.d.w.r.f.UnsealedTsFileRecoverPerformer:291 - The compression ratio of tsfile /iotdb/data/datanode/data/sequence/iot_data/8/2949/1784016833721-8-0-0.tsfile is 0.00, totalMemTableSize: 0, the file size: 3867189

解决方案:按gpt提示,通过以下命令找到缺少resource的tsfile:

```bash
find ./iotdb/data/datanode/data -type f -name '*.tsfile' |
while IFS= read -r file; do
[ -f "${file}.resource" ] || echo "$file"
done | tee /tmp/tsfiles-without-resource.txt

wc -l /tmp/tsfiles-without-resource.txt
```
然后将这几个文件移动走,才能正常启动服务。

### What did you expect to see?

服务关闭之后能够自行正常启动,这是一个基本能力。

### What did you see instead?

服务实现优雅关闭

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

バージョン 2.0.8 の Docker Compose デプロイメントで障害を再現し、その後、UnsealedTsFileRecoverPerformer 周辺の起動時リカバリと、iotdb/data/datanode/data 配下の影響を受けたファイルを調査します。シャットダウンと再起動のログを比較し、特に .tsfile に対応する .resource ファイルがないケースを確認します。通常のシャットダウン後にファイルを手動で移動せずサービスが正常に再起動し、関連するテスト領域が特定された場合は再現ケースのカバレッジがあることを完了条件とします。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, java
領域
databases
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。