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

fix(server): all scan commands needs to return cursor as bulk string #503 #504

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

boazsade
Copy link
Contributor

@boazsade boazsade commented Nov 21, 2022

Signed-off-by: Boaz Sade [email protected]

fixes issue #503
The scan commands - scan, hscan, zscan, sscan all should return bulk string and not a "regular string" for the cursor value.
This issue was found as a result of running a java client (redisson source code, that expecting to have the correct data type for this case.

Comment on lines 72 to 76
def generate_key_val():
now = datetime.datetime.now()
for i in range(10):
string_val = "".join(random.choice(ascii_lowercase) for i in range(random.randint(1, 8)))
yield f"key{i}-{time.time()}", f"value={i}{string_val}{now}"
Copy link
Contributor

@dranikpg dranikpg Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have this kind of stuff without timestamps in utility.py as gen_test_data (note, there should be no randomicity if you change it)

I have also bulk filling for setting large amounts of values in mset commands

I know its just tests, but maybe we can make such utils re-usable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - I took this test from some offline code I have - I will change it

@boazsade boazsade force-pushed the redisson-client-sscan branch from 287ccdd to 2b5f33a Compare November 21, 2022 14:48
@romange romange merged commit 235ff67 into dragonflydb:main Nov 21, 2022
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.

3 participants