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

Rollback inconsistencies #906

Open
confuser opened this issue Dec 7, 2020 · 1 comment
Open

Rollback inconsistencies #906

confuser opened this issue Dec 7, 2020 · 1 comment
Labels

Comments

@confuser
Copy link
Member

confuser commented Dec 7, 2020

Current rollback behaviour is inconsistent depending on when a user was banned/unbanned and potentially rebanned.

Instead of looping through all bans, and then unbans etc serially, build a view of all punishments against player in chronological order and undo accordingly

@confuser confuser added the bug label Dec 7, 2020
@rautamiekka
Copy link

Yeah, you shouldn't loop through matches as they're streamed, you should create a single statement (whether from looping within software or accurately telling the db what you want) which'll do whatever it needs to, within the limits of the statement (like, you can't UPDATE/INSERT/DELETE in a single statement), and preferably send multiple statements in a single go.

Or use a view, like you said. Never used or read much about views, so I can't tell right away if that's of any use, but surely the feature wasn't created without precise reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants