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 Set unit test sscanMultiple fail in redis7 #2349

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

yangbodong22011
Copy link
Contributor

@yangbodong22011 yangbodong22011 commented Mar 7, 2023

Before this pr, sscanMultiple will fail at assertThat(cursor.getCursor()).isNotNull().isNotEqualTo("0");, because the bottom layer is the ListPack(set_max_listpack_entries default is 128) structure at this time. It does not support the count option. It will return all values and set the CURSOR to 0.

see https://redis.io/commands/scan/ Why SCAN may return all the items of an aggregate data type in a single call? for more info.

This PR also runs successfully on versions prior to 7.0 without incompatibility.

Make sure that:

  • You have read the contribution guidelines.
  • You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.

Before this pr, `sscanMultiple` will fail at `assertThat(cursor.getCursor()).isNotNull().isNotEqualTo("0");`
This is because the bottom layer is the ListPack structure at this time. It does not support the count option.
It will return all values and set the CURSOR to 0.

see https://redis.io/commands/scan/ *Why SCAN may return all the items of an aggregate data type in a single call?*
for more info.
@mp911de mp911de added the type: task A general task label Apr 18, 2023
@mp911de mp911de merged commit 357567e into redis:main Apr 18, 2023
@mp911de mp911de added this to the 6.2.3.RELEASE milestone Apr 18, 2023
@mp911de
Copy link
Collaborator

mp911de commented Apr 18, 2023

Thank you for your contribution. That's merged and backported now.

mp911de pushed a commit that referenced this pull request Apr 18, 2023
Before this pr, `sscanMultiple` will fail at `assertThat(cursor.getCursor()).isNotNull().isNotEqualTo("0");`
This is because the bottom layer is the ListPack structure at this time. It does not support the count option.
It will return all values and set the CURSOR to 0.

see https://redis.io/commands/scan/ *Why SCAN may return all the items of an aggregate data type in a single call?*
for more info.
@mp911de mp911de modified the milestones: 6.2.3.RELEASE, 6.2.4.RELEASE Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants