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

Open
#18,203 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
docker, java
Domain
databases

Research direction

Reproduce the failure with the version 2.0.8 Docker Compose deployment, then inspect startup recovery around UnsealedTsFileRecoverPerformer and the affected files under iotdb/data/datanode/data. Compare shutdown and restart logs, especially cases where a .tsfile lacks its .resource file. Done means the service restarts successfully after a normal shutdown without manually moving files, with coverage for the reproduced case if the relevant test area is identified.

Written by the indexing model from the issue text.

Description

Search before asking
  • I searched in the 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:

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!
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 12h
Merged PRs (30d)
284

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/iotdb

All issues in apache/iotdb

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.