influxdata/influxdb

[2.x] BoltDB corruption causes InfluxDB to not startup

已關閉

#27,361 建立於 2026年4月17日

 (0 則留言) (0 個反應) (1 位負責人)Rust (3,707 個分叉)batch import
area/2.xarea/metadatahelp wantedkind/bugneeds repro

倉庫指標

星標
 (31,498 顆星)
PR 合併指標
 (平均合併 1天 16小時) (30 天內合併 27 個 PR)

描述

We have seen a few instances where BoltDB metadata becomes corrupt, causing InfluxDB to not start up.

Example log where we have Missing metadata:

ts=2026-04-16T17:20:36.292376Z lvl=info msg="Initializing meta Client subscriber." log_id=12HpmwdW000
ts=2026-04-16T17:20:36.292446Z lvl=debug msg="buckets find" log_id=12HpmwdW000 store=new took=0.064ms
ts=2026-04-16T17:20:36.292451Z lvl=info msg="Checking InfluxDB metadata for prior version." log_id=12HpmwdW000 bolt_path=/Users/devan/.influxdbrrfoo/influxd.bolt
ts=2026-04-16T17:20:36.292453Z lvl=error msg="Missing metadata for bucket." log_id=12HpmwdW000 bucket=test-foo-bar bucket_id=620639ca7822c92b
ts=2026-04-16T17:20:36.292456Z lvl=error msg="Incompatible InfluxDB 2.0 metadata found. File must be moved before influxd will start." log_id=12HpmwdW000 path=/Users/devan/.influxdbrrfoo/influxd.bolt
ts=2026-04-16T17:20:36.292464Z lvl=error msg="Incompatible InfluxDB 2.0 version found. Move all files outside of engine_path before influxd will start." log_id=12HpmwdW000 engine_path=/Users/devan/.influxdbrrfoo/engine

Example log where _tasks bucket is missing causing a restart loop:

 lvl=error msg="err finding runs:" service=task-executor error="bucket \"_tasks\" not found"
 lvl=fatal msg="could not load existing scheduled runs" error="bucket \"_tasks\" not found"

On inspecting the BoltDB file, two organization IDs were found to have entries in the tasksv1 bucket but were missing from the corresponding organizationsv1 and bucketsv1 buckets:

  • tasksv1 contains: orgID1, orgID2
  • organizationsv1 and bucketsv1 are missing entries for orgID1 and orgID2

We have not yet been able to reliably reproduce the issue.

貢獻者指南