Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG (maybe)] valkey-java regression failed at scan with type #1490

Open
yangbodong22011 opened this issue Dec 27, 2024 · 1 comment
Open
Labels
not-a-bug Nothing wrong, nothing to fix

Comments

@yangbodong22011
Copy link
Contributor

Describe the bug

valkey-java regression test use unstable valkey code, but after 3eb8314, some test fail.

➜  valkey git:(unstable) rcli 
127.0.0.1:6379> set a a 
OK
127.0.0.1:6379> hset b b b
(integer) 1
127.0.0.1:6379> set c c
OK
127.0.0.1:6379> sadd d d
(integer) 1
127.0.0.1:6379> set e e
OK
127.0.0.1:6379> zadd f 0 f
(integer) 1
127.0.0.1:6379> set g g
OK
127.0.0.1:6379> scan 0 count 4 type string
1) "0"  // this is failure point
2) 1) "a"
   2) "c"
   3) "e"
   4) "g"

The failure point is that cursor should not be 0, but i do not known this is right, may be it should be 0?
I also test redis latest unstable code, the result is not 0.

➜  redis git:(unstable) rcli 
127.0.0.1:6379> set a a
OK
127.0.0.1:6379> hset b b b
(integer) 1
127.0.0.1:6379> set c c
OK
127.0.0.1:6379> sadd d d
(integer) 1
127.0.0.1:6379> set e e
OK
127.0.0.1:6379> zadd f 0 f
(integer) 1
127.0.0.1:6379> set g g
OK
127.0.0.1:6379> scan 0 count 4 type string
1) "1"
2) 1) "g"
   2) "a"
   3) "c"
   4) "e"
127.0.0.1:6379>

can you have a look? @zuiderkwast

@zuiderkwast
Copy link
Contributor

zuiderkwast commented Dec 27, 2024

Returned cursor 0 means all elements have been returned. It is true in this case, so I think it's not a bug.

Another correct result is a non-zero cursor and the next scan returns no elements and zero cursor. Non-zero retured cursor means there are maybe more elements.

@zuiderkwast zuiderkwast added the not-a-bug Nothing wrong, nothing to fix label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-a-bug Nothing wrong, nothing to fix
Projects
None yet
Development

No branches or pull requests

2 participants