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

Added chunking logic to the SUNION call to avoid lengthy blocking. #89

Merged

Conversation

davidalger
Copy link
Contributor

Added support to getIdsMatchingAnyTags for chunking the SUNION calls to mitigate long-running SUNION calls from blocking redis connection requests. The chunk size defaults to 500 but is configurable via the sunion_chunk_size setting in the backend_options of the redis cache configuration.

@davidalger
Copy link
Contributor Author

Note: Being unfamiliar with using the Lua scripting, I did not attempt to alter that to use the new configuration option for chunking when in Lua mode.

colinmollenhour added a commit that referenced this pull request Apr 29, 2015
Added chunking logic to the SUNION call to avoid lengthy blocking.
@colinmollenhour colinmollenhour merged commit 582e8cc into colinmollenhour:master Apr 29, 2015
@colinmollenhour
Copy link
Owner

Thanks, David!

@sksonic
Copy link

sksonic commented Jun 9, 2017

@colinmollenhour We have experienced the same issue with the SUNION call blocking redis. The chunking option above has helped us but we had to disable lua scripting. Can a similar chunking logic be applied when lua scripting is enabled?

@colinmollenhour
Copy link
Owner

It probably could be, but unfortunately this is not something I have the time to tackle. However, I would suggest investigating to see why you have so many tags; to me having to query for ids matching over 500 tags indicates an issue with improper tagging strategy.

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.

None yet

3 participants