Skip to content

fix bug of scan command#362

Open
wsa-wsa wants to merge 1 commit intoTencent:unstablefrom
wsa-wsa:fix3
Open

fix bug of scan command#362
wsa-wsa wants to merge 1 commit intoTencent:unstablefrom
wsa-wsa:fix3

Conversation

@wsa-wsa
Copy link
Contributor

@wsa-wsa wsa-wsa commented Sep 1, 2025

Description

修复scan命令的在切换数据库之后返回不在当前数据库中的内容,并添加了部分测试用例。
存在问题
1、误用全局slots,导致总是遍历不属于该kvstore的slot
2、seek查找到的是第一个大于等于该perfix的记录,但是由于type和dbid的存在,当前查找到的slot的值可能在需要查找的目标值前面,该slot上实际上是存在目标值的,不应该进行获得nextSlot操作
3、当没有查找到一个数据(即*seq==0)且*scanTimes == scanMaxTimes时,scan命令会展示无效数据被错误返回给用户

Types of Changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scan 命令在数据库0,1执行可以,在其他数据库执行,返回数据0的第一行

1 participant