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

/sync can omit state changes when certain events are filtered out #16928

Closed
richvdh opened this issue Feb 16, 2024 · 3 comments · Fixed by #16930
Closed

/sync can omit state changes when certain events are filtered out #16928

richvdh opened this issue Feb 16, 2024 · 3 comments · Fixed by #16930

Comments

@richvdh
Copy link
Member

richvdh commented Feb 16, 2024

Consider the following DAG:

           E1
         ↗    ↖
        |      S2
        |      ↑
      --|------|----
        |      |
        E3     |
         ↖    /
           E4

The client has a filter that excludes E4, and a limit that means we return a timeline that is limited to after S2, represented by the horizontal dashed line above. (Either limit=1, or there are lots of events at E3.)

We still need to tell the client about S2, so it should appear in the state section of the response.

Currently, it is omitted; instead the timeline contains E3, and the state is empty.

@richvdh richvdh added the A-Sync label Feb 16, 2024
@richvdh
Copy link
Member Author

richvdh commented Feb 16, 2024

Possibly this also happens if the user has chosen to ignore messages from the sender of E4 ?

@richvdh
Copy link
Member Author

richvdh commented Feb 16, 2024

I think this was introduced by matrix-org/synapse@9e696bd.

richvdh added a commit that referenced this issue Feb 16, 2024
Fix an issue which could cause state to be omitted from the sync response if
the last event was filtered out.

Fixes: #16928
@richvdh
Copy link
Member Author

richvdh commented Feb 16, 2024

@kegsay has promised to write a complement test for this

richvdh added a commit that referenced this issue Feb 16, 2024
Fix an issue which could cause state to be omitted from the sync response if
the last event was filtered out.

Fixes: #16928
richvdh added a commit that referenced this issue Feb 16, 2024
Fix an issue which could cause state to be omitted from the sync response if
the last event was filtered out.

Fixes: #16928
kegsay added a commit to matrix-org/complement that referenced this issue Feb 16, 2024
And some drive-by logging improvements, along with a new
`ServerRoom.WaiterForEvent(eventID)` function which makes
waiting for an event to arrive on the Complement server
much much easier to write in code.
richvdh added a commit that referenced this issue Feb 17, 2024
Fix an issue which could cause state to be omitted from the sync response if
the last event was filtered out.

Fixes: #16928
richvdh added a commit that referenced this issue Feb 19, 2024
Fix an issue which could cause state to be omitted from the sync response if
the last event was filtered out.

Fixes: #16928
richvdh added a commit that referenced this issue Feb 19, 2024
Fix an issue which could cause state to be omitted from the sync response if
the last event was filtered out.

Fixes: #16928
richvdh added a commit that referenced this issue Mar 14, 2024
Fix an issue which could cause state to be omitted from the sync response if
the last event was filtered out.

Fixes: #16928
richvdh added a commit that referenced this issue Apr 4, 2024
Fix an issue which could cause state to be omitted from the sync response if
the last event was filtered out.

Fixes: #16928
richvdh added a commit that referenced this issue Apr 4, 2024
Fix a long-standing issue which could cause state to be omitted from the
sync response if the last event was filtered out.

Fixes: #16928
erikjohnston pushed a commit to matrix-org/complement that referenced this issue May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant