提交 1e9e41a8 编写于 作者: D Davies Liu

ignore empty list when cleanup

上级 85fcdb67
......@@ -1791,6 +1791,9 @@ func (r *redisMeta) cleanupSlices() {
logger.Errorf("scan slices: %s", err)
break
}
if len(ckeys) == 0 {
break
}
values, err := r.rdb.MGet(ctx, ckeys...).Result()
if err != nil {
logger.Warnf("mget slices: %s", err)
......@@ -1842,6 +1845,9 @@ func (r *redisMeta) cleanupLeakedChunks() {
ikeys = append(ikeys, k)
rs = append(rs, p.Exists(ctx, r.inodeKey(Ino(ino))))
}
if len(rs) == 0 {
break
}
_, err = p.Exec(ctx)
if err != nil {
logger.Errorf("check inodes: %s", err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册