重建 TSI 索引
在某些情况下,可能需要刷新并重建 TSI 索引。例如,清除损坏的索引文件或删除过时的索引数据。
要重建您的 InfluxDB TSI 索引
停止 InfluxDB (
influxd
) 进程.在
influxd
运行时重建 TSI 索引可能会阻止某些数据被查询。导航到您的 InfluxDB 引擎路径中的
data
目录。引擎路径取决于您的操作系统或自定义引擎路径设置。cd ~/.influxdbv2/engine/data/
cd -Path 'C:\%USERPROFILE%\.influxdbv2\engine\data\'
删除 InfluxDB
data
目录中的所有_series
目录。 默认情况下,_series
目录存储在/data/<bucket-id>/_series
,但请检查并删除整个data
目录中的_series
目录。find . -type d -name _series -exec -delete
get-childitem -Include _series -Recurse -force | Remove-Item -Force -Recurse
删除所有
index
目录。 默认情况下,index
目录存储在/data/<bucket-id>/autogen/<shard-id>/index
,但请检查并删除整个data
目录中的index
目录。find . -type d -name index -exec -delete
get-childitem -Include index -Recurse -force | Remove-Item -Force -Recurse
使用
influxd inspect build-tsi
命令重建 TSI 索引。influxd inspect build-tsi
此页内容是否对您有帮助?
感谢您的反馈!