server: scrub a departed user's pending invites via a User.invited reverse index instead of scanning every channel on the network per quit — the old O(channels)-per-quit path was O(channels*quits) on a netsplit; the index is maintained at the 4 invite add/remove sites (INVITE cmd, S2S INVITE, join-consume, UNINVITE)
This commit is contained in:
parent
5101b1361d
commit
ab0ccae71f
7 changed files with 23 additions and 2 deletions
|
|
@ -248,6 +248,7 @@ pub struct User {
|
|||
pub caps: Caps, // enabled IRCv3 capabilities
|
||||
pub sasl_mech: Option<String>, // SASL mechanism chosen, mid-handshake
|
||||
pub channels: HashSet<String>, // lowercased channel keys
|
||||
pub invited: HashSet<String>, // channels this user has a pending +i invite to (reverse index)
|
||||
pub watch: Vec<String>, // WATCH list — lowercased nicks
|
||||
pub monitor: Vec<String>, // MONITOR list — lowercased nicks
|
||||
pub silence: Vec<String>, // SILENCE masks — nick!user@host globs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue