Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Invites are not always included in sync #7406

Open
schmop opened this issue May 4, 2020 · 2 comments
Open

Invites are not always included in sync #7406

schmop opened this issue May 4, 2020 · 2 comments
Labels
A-Invite Inviting users to rooms and accepting invites A-Sync defects related to /sync S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@schmop
Copy link
Contributor

schmop commented May 4, 2020

Description

On fast changing membership states the sync will not reliably include rooms a user was invited to.
It might be related to issues
#4533 and
#4422

Reproduction

This is not easily reproducable, an attempt should look as follows:

  • Roomadmin a invites user b into rooms r_a and r_b
  • a kicks b from r_a before he accepts the invite
  • a changes room_state of r_b multiple times
  • b retrieves current rooms via (initial)sync, r_b doesn't show

Version information

We used the synapse version v1.12.0.
Installed per git clone
And is operating in a debian stretch docker container.

Hotfix

A possibility to fix it temporarly is to restart the server or invalidate the caches.

We debugged this issue for quite some time and are using a hotfix, that stops caching from
get_forgotten_rooms_for_user in roommember.py by removing following line:

@babolivier babolivier added z-bug (Deprecated Label) z-p2 (Deprecated Label) A-Sync defects related to /sync labels May 5, 2020
@alariej
Copy link

alariej commented Jun 12, 2020

It might even be a more general problem. Changes to an invite room do not seem to be included in any sync at all. For example in the case of a "direct" room, no syncs are pushed when the inviter changes display name or avatar, or leaves the room. I tested this with and without lazy_load_members filter parameter, with no difference.

@Barry3D
Copy link

Barry3D commented Jun 21, 2021

I am currently running into this problem with synapse version v1.25.0.

It is easier to reproduce right now:

  • User A and B join a room
  • User B leaves and forgets the room
  • User B closes the client, so that the sync with the invitation isn't immediately pushed
  • User A invites User B
  • User B opens the client and receives stale data

By looking into the database I found out that the data is received and persisted correctly, however the data in the following syncs only contain the state events for the user leaving the room.

I was also able to fix it via the change suggested in the original issue with slight adjustments since roommember.py has been moved and changed.

@erikjohnston erikjohnston added S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. and removed z-bug (Deprecated Label) z-p2 (Deprecated Label) labels Jul 23, 2021
@MadLittleMods MadLittleMods added the A-Invite Inviting users to rooms and accepting invites label Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Invite Inviting users to rooms and accepting invites A-Sync defects related to /sync S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

No branches or pull requests

6 participants