386 字 | 1 分钟
tendisadmin [operation] [arg]
Available since 1.0.0.
命令说明
Tendis存储版
的管理命令
命令参数
目前支持的值有
sleep
lockdb
recovery
tendisadmin sleep [second]
用于模拟Redis
的debug sleep
操作,整个实例sleep若干秒。如果执行这个,会对所有kvstore上X锁,阻塞所有数据操作。但Gossip线程池
并不阻塞。
tendisadmin lockdb [second]
类似于tendisadmin sleep [second]
,但同时阻塞Gossip线程池
,这样就完全等价于Redis
的debug sleep
,主要用于测试用例。
tendisadmin recovery
一旦rocksdb
出现后台错误,例如磁盘满,整个rocksdb会处于read only状态。如果想解决异常状态,例如释放一些空间,需要执行tendisadmin recovery
命令来修复异常状态。详细可查看Background Error Handling
127.0.0.1:8903> set a b
(error) ERR:3,msg:IO error: No space left on deviceWhile appending to file: ./db/5/000084.sst: No space left on device
127.0.0.1:8903> info rocksdbBgError
# RocksdbBgError
rocksdb2:bgerror=IO error: No space left on deviceWhile appending to file: ./db/2/000093.sst: No space left on device,reason=Compaction,count=1
rocksdb4:bgerror=IO error: No space left on deviceWhile appending to file: ./db/4/000092.sst: No space left on device,reason=Compaction,count=1
rocksdb5:bgerror=IO error: No space left on deviceWhile appending to file: ./db/5/000089.sst: No space left on device,reason=Compaction,count=1
rocksdb6:bgerror=IO error: No space left on deviceWhile appending to file: ./db/6/000086.sst: No space left on device,reason=Compaction,count=1
127.0.0.1:8903> tendisadmin recovery
OK
127.0.0.1:8903> set a b
OK
命令返回
Simple string reply: OK when the configuration was set properly. Otherwise an error is returned.
Examples
如上