DevotedMC / BanStick

Player / IP / CIDR / VPN / Shared connection banning with a vengeance. Built for Spigot 1.16.4
http://www.devotedmc.com
BSD 3-Clause "New" or "Revised" License
1 stars 4 forks source link

Banning applies immediately across servers with a shared DB, unbanning does not #11

Open GavJenks opened 5 years ago

GavJenks commented 5 years ago

Presumably, the plugin checks the actual database for logins, so a DB update on banning propagates (although I'm not sure if it is instant or not, actually). But when I unban somebody, it does not propagate and they are still blocked from logging onto a different shard. I have to go teleport aruond and unban them from every shard.

It is possible that if I only did it in one place, it would figure it out over the course of a day or something, but I can't rely on that, because I don't know if they'll log in somewhere while I'm waiting for updates to spread.

I would suggest that manually typed out bans and forgives by admins should both probably immediately update the database. It seems unnecessary to cache updates for something that only admins can type and that they only type once every few hours or days.

Unless I just got lucky, and logins are only using the cache, in which case dunno what to suggest

ProgrammerDan commented 5 years ago

The present issue is that the results of the commands are shard/server local and the DB commit is either immediate or very shortly delayed (some things are cached and applied in batches). Regardless of this, the other shards all have bans in memory for fast application, and they don't realize their cache is out of date.

So, somehow need to alert all co-users of the DB that they need to refresh their state. Thanks for this issue, will consider best approach!