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

Fixes list count drifting over time #525

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

pushchris
Copy link
Contributor

Currently the list count has a fundamental flaw in that its not decrementing the total whenever a user is removed from a list so over time it just continues to drift upward.

This completely removes partial counting from the list totals equation and instead relies on redis key incrementing and decrementing to keep track of totals and then periodically pulls those values into the database. This removes the counting load almost completely from the database.

It also fixes re-counting when updating a ruleset for a list.

This does temporarily reset the count of every list to zero so that they can be recalculated accurate to start the new incrementing system.

@pushchris pushchris merged commit 90f063e into main Oct 17, 2024
3 checks passed
@pushchris pushchris deleted the fix/list-count-drifting-over-time branch October 17, 2024 02:12
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.

1 participant