重建 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 -deleteget-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 -deleteget-childitem -Include index -Recurse -force | Remove-Item -Force -Recurse使用
influxd inspect build-tsi命令重建 TSI 索引。influxd inspect build-tsi
此页内容是否对您有帮助?
感谢您的反馈!