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

Historical state events from state_events_at_start in the MSC2716 /batch_send endpoint get pushed to an application service /transactions #11241

Closed
Tracked by #10737
MadLittleMods opened this issue Nov 3, 2021 · 1 comment · Fixed by #11265
Assignees
Labels
A-Application-Service Related to AS support T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Nov 3, 2021

As discovered by @tulir, when using the MSC2716 /batch_send endpoint, events specified in state_events_at_start will come down incremental /sync and the application services /transactions endpoints. Since this is historical state, it shouldn't be coming down the live pipe.

We already have a Complement tests to ensure the historical messages don't come down incremental sync, but we should also do the same for the state events.

Relevant code

@MadLittleMods MadLittleMods added the T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. label Nov 3, 2021
@MadLittleMods
Copy link
Contributor Author

MadLittleMods commented Nov 5, 2021

From my testing, the historical state does not come down /sync thanks to it being an outlier already. But we should make sure it's also historical in the internal metadata.

Need to dig into the application service being pushed historical state events on /transactions by the homeserver which was the original report anyway.

I just assumed it would be a problem on incremental /sync if it was pushed on /transactions.

MadLittleMods added a commit to matrix-org/complement that referenced this issue Nov 6, 2021
@MadLittleMods MadLittleMods self-assigned this Nov 9, 2021
@MadLittleMods MadLittleMods changed the title Historical state events from state_events_at_start in the MSC2716 /batch_send endpoint come down /sync and /transactions Historical state events from state_events_at_start in the MSC2716 /batch_send endpoint get pushed to an application service /transactions Nov 10, 2021
MadLittleMods added a commit that referenced this issue Nov 18, 2021
…via `/transactions` (MSC2716) (#11265)

Mark historical state from the MSC2716 `/batch_send` endpoint as `historical` which makes it `backfilled` and have a negative `stream_ordering` so it doesn't get queried by `/transactions`.

Fix #11241

Complement tests: matrix-org/complement#221
@MadLittleMods MadLittleMods added the A-Application-Service Related to AS support label Mar 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Application-Service Related to AS support T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
1 participant