Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Use SSCAN for DeleteAll by default to avoid pulling large sets into memory. #257

Merged
merged 3 commits into from
Jun 9, 2021

Conversation

Layoric
Copy link
Member

@Layoric Layoric commented Jun 9, 2021

This is just a possible solution, ideally the client can control pageSize since it will impact how chatty the command is for perform the delete all, but currently this isn't a configurable option on the client that I can see.

The other trade off will be compatibility as this would require Redis 2.8 at a minimum, where as SMEMBERS has been around since 1.0. Saying that Redis latest stable is 6.2 and only officially supports -2 from stable.

Layoric added 2 commits June 9, 2021 12:43
…ling all keys into memory all at once. This will reduce memory, but make the command chatty for very large typed sets.
@Layoric Layoric requested a review from mythz June 9, 2021 03:37
Add tests for deletes bigger than batch size.
Change to use while loop rather than recursion.
@mythz mythz merged commit cc41b61 into master Jun 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants