Ban Management

Ban Management

193k Downloads

Rollback inconsistencies

confuser opened this issue ยท 1 comments

commented

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

commented

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.