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

Matrix room member lists increasingly diverge from IRC #1838

Open
f0x52 opened this issue Dec 9, 2024 · 3 comments
Open

Matrix room member lists increasingly diverge from IRC #1838

f0x52 opened this issue Dec 9, 2024 · 3 comments

Comments

@f0x52
Copy link
Contributor

f0x52 commented Dec 9, 2024

This has been an issue for a while now, where the Matrix side of portal rooms has many usernames that joined the IRC channel somewhere in the past, but left a long time ago.

I think this is partly fixed with matrix-org/node-irc#118, as that fixes a bug where the NAMES response on re-used clients would always be a superset of the previous listing, so never leaving old users unless the PART/QUIT was directly received.

The NAMES response is properly received at bridge startup at least, but that causes it to queue a gigantic amount of leave items in the MemberListSyncer, which don't retry, and which time-out after the default of 30 minutes.
In the case of my Libera bridge, around 120 thousand, which it's only able to clear a fraction of them the 30 minutes TTL.

Is there a reason to queue these with a TTL at all?
Also, I think it would be an improvement if matrix-appservice-bridge's membership queue would be smarter at cancelling out leave/join's for the same user, if there's already an entry in the queue for them, but maybe that's better directed at that repo instead.

EDIT: bridge is globally configured to do member list updates both ways, initial and incremental both true

@f0x52
Copy link
Contributor Author

f0x52 commented Dec 9, 2024

I read over this at first, but the logic here

if (this.memberLists.irc[channel] !== undefined ||
!this.server.shouldSyncMembershipToMatrix("initial", channel)) {
return;
}
const nickList = [...names.keys()];
this.memberLists.irc[channel] = nickList;

prevents NAMES updates from ever being used after initial sync, whereas they would be very useful to keep everything in sync, especially after netsplits. Or to retry failed leave queue items, when someone joins at a later time

@jkhsjdhjs
Copy link
Contributor

matrix-org/node-irc#117 may also be a cause:
If a user joins the IRC channel, their puppet joins the corresponding matrix channel. If they change their nick, this isn't recognized. Thus, if they write a message with their new nick, the irc bridge assumes it must've missed a join and has a new puppet join the matrix channel to deliver the message. If the IRC user now decides to part or quit, only the new matrix puppet leaves, the original one will stay there forever.

I still run version 0.34.0 of the bridge, as it is the most recent version where quits, parts and nick changes are bridged properly.

@f0x52
Copy link
Contributor Author

f0x52 commented Dec 11, 2024

@jkhsjdhjs ah indeed, already pulled your fix for that into my forked node-irc/matrix-appservice-irc too :)

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

No branches or pull requests

2 participants