BirdWatcher 1.X 版本发布,保姆级使用教程来啦!

4d2e4fdbdea5997fcbe8a257e0e38d54.png

近期,BirdWatcher 1.0.1 发布,为了方便用户使用,我们推出了保姆级教程,手把手教你上手 BirdWatcher。后续,我们也将推出更多关于具体使用场景的教程! 

众所周知,Milvus 是读写分离且无状态的向量数据库,状态信息储存在 etcd 中,coordinator 节点去 etcd 请求状态并修改状态。当用户需要查看状态信息、清理状态信息场景时,etcd 调试工具必不可少。

BirdWatcher  是 Milvus 2.0 项目的调试工具,该工具连接 etcd 并检查 Milvus 系统的某些状态。

安装方法

参见 https://github.com/milvus-io/birdwatcher/releases/tag/v1.0.1

指令

e8222f92c05851ccb695775de4549c67.png

connect

connect --etcd [etcd ip]:2379 --rootPath by-dev

Milvus 默认配置 etcd meta 路径在 by-dev下,--rootPath 参数可忽略。

backup

用于备份 etcd 数据。

--ignoreRevision  忽略 etcd revision的保证,强制执行备份,用户备份在线系统时 revision 变化过快遇到 revision compacted 的问题。

38070af99cea3c4408831f3e482e8f39.png

disconnect

断开 etcd 连接

exit

退出 connect etcd 状态。

force-release

强制把 collection 进行释放,可以处理 2.1 版本的卡住的情况。

使用时按以下步骤:

  • querycoord & querynode 节点 scale replica = 0;

  • 使用 birdwatcher force-release 强制释放内存;

  • 使用 show querycoord-task --collection [id] 命令检查 task 状态;

  • 将 querycoord & querynode 节点 replica 数量恢复;

  • 观察集群状态是否正常 running;

  • 手动进行 collection load 操作。

garbage-collect(dry-run)

扫描对象存储(磁盘)的 collection 是否有垃圾。

--run 执行清理

release-dropped-collection (dry-run)

清除保存在 querycoord 中的已删除 collection 信息。(能够解决查询表时,发现表已经被删除的情况。)

--run 执行清除

remove(dry-run)

首先需要注意的是,执行 remove 命令会造成数据丢失,请谨慎操作!其次,remove 命令可对问题 segment ,问题 channel 进行删除。


具体指令是:

remove segment --segment [segment-id]

remove channel --channel [channel_name]

信息确认后,--run 执行清理:

remove segment --segment [segment-id] --run

repair

主要用于修复部分组件元信息不正常的问题。需要注意的是,执行该操作可能会丢失部分数据。

949f0ac58fd44acd3260aecd4ca45d07.png

指令:repair-segment --collection [collection_id]

-- run 执行

show

2c799bd4f12d86236649ab5cb20240bf.png

  • show checkpoint --collection [id]

返回该 collection 里各个 shard 的记录的最新 checkpoiont。

2b9d3282261074bed0664af7998a587d.png

  • show collection

显示所有的 collection 信息,包括 collection & partition id、name;field 信息,默认查询一致性和 channel 信息。

4258a785a8040d49cc7de3c0d2d1e12e.png

添加--id参数可显示指定collection,如:show collection --id 435625544198651905

  • show collection-loaded

显示已加载 collection 的信息,其中包含 replica 数量信息。

  • show session

显示各节点对应 id 信息。

462790944a33cb3fd54b640a32625ce2.png

  • show replica

展示 replica 的信息,该 replica 由哪些 leader 分配,在哪些 Nodes 上。

58ec70577be38664d1b5264e013af894.png

  • show segment

显示每个 segment 的 id、 state 、row count 信息。

47b5e17d64375a3e32165b1b03a890a7.png

--collection [id] 根据 collection id 进行过滤

--segment [id] 根据 segment id 进行过滤

--format table 由 table 形式展示数据,能看到 Max Row Num,DetalLog Nums、Binlog 等信息;还包括 segment 的时间点位信息。这些信息能帮助甄别 segment 状态,以及分析系统预期行为。

497f318d7f41f4496a179884ab24f3da.png

--detail:是否打印 binlog 信息的开关。打印 Binlogs、Delta Logs、Statslogs 的全信息。

  • show segment-index

展示 segment 索引的状态,可以看出索引是否被创建;命令后可加--collection 或 --segment 进行过滤。

如:show segment-index --collection 435617817281691649

552e09eaeb725f9a2cb839e52eda82a9.png

  • show-log-level

展示各组件的日志等级。

update-log-level

修改组件日志等级。

指令:update-log-level log_level [component] [serverId] [flags]

示例:update-log-level info proxy 63

eb1d0e336406cccc7c6a04eaaf4aedf4.png

visit

查看组件 service 的模式

组件:[datacoord、datanode、indexcoord、 indexnode、 querycoord、 querynode、rootcoord ]

指令:visit querycoord [node_id]

解决案例

repair-channel --collection [collection_id] --run

(https://github.com/milvus-io/milvus/issues/20794)

官方地址

  • https://github.com/milvus-io/birdwatcher

  • https://github.com/milvus-io/birdwatcher/releases/tag/v1.0.1

88cc9d85416d936c913d9d5b30e61180.png

猜你喜欢

转载自blog.csdn.net/weixin_44839084/article/details/129631200