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

Fix bug /sync returning 404 #12729

Merged
merged 3 commits into from
May 16, 2022
Merged

Fix bug /sync returning 404 #12729

merged 3 commits into from
May 16, 2022

Conversation

erikjohnston
Copy link
Member

@erikjohnston erikjohnston commented May 13, 2022

I've based this on v1.59 branch, I think its worth sneaking this fix into v1.59.0

Fixes #12571

@erikjohnston erikjohnston marked this pull request as ready for review May 13, 2022 08:49
@erikjohnston erikjohnston requested a review from a team as a code owner May 13, 2022 08:49
@erikjohnston
Copy link
Member Author

I think the test failure is due to this not being up to date with develop?

@erikjohnston erikjohnston added the X-Release-Blocker Must be resolved before making a release label May 13, 2022
@DMRobertson
Copy link
Contributor

I think the test failure is due to this not being up to date with develop?

It looks like we would need #12683. Do we want to include that in the release branch too?

Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunno if it's worth a test case?

WHERE room_id = ?
AND stream_ordering <= ?
AND NOT outlier
AND rejections.reason IS NULL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having trouble understanding how #12319 broke things. The previous code did a get_recent_events_for_room, which looks like it doesn't check for rejection either?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, hmm, you're right. The PR did make it worse though as the query actually doubles the specified limit (to take account of filtering), so before we'd have to have two rejected events next to each other to hit the bug

@erikjohnston
Copy link
Member Author

I think the test failure is due to this not being up to date with develop?

It looks like we would need #12683. Do we want to include that in the release branch too?

I'd rather not put more into this release if we can help it. I can live with complement failing that one test for now

Co-authored-by: David Robertson <davidr@element.io>
@DMRobertson
Copy link
Contributor

Complement failure is expected, see above.

@DMRobertson DMRobertson merged commit 8689230 into release-v1.59 May 16, 2022
@DMRobertson DMRobertson deleted the erikj/fix_sync branch May 16, 2022 11:06
DMRobertson pushed a commit that referenced this pull request May 16, 2022
Synapse 1.59.0rc2 (2022-05-16)
==============================

Synapse 1.59 makes several changes that server administrators should be aware of:

- Device name lookup over federation is now disabled by default. ([\#12616](#12616))
- The `synapse.app.appservice` and `synapse.app.user_dir` worker application types are now deprecated. ([\#12452](#12452), [\#12654](#12654))

See [the upgrade notes](https://github.com/matrix-org/synapse/blob/develop/docs/upgrade.md#upgrading-to-v1590) for more details.

Additionally, this release removes the non-standard `m.login.jwt` login type from Synapse. It can be replaced with `org.matrix.login.jwt` for identical behaviour. This is only used if `jwt_config.enabled` is set to `true` in the configuration. ([\#12597](#12597))

Bugfixes
--------

- Fix a bug introduced in Synapse 1.58.0 where `/sync` would fail if the most recent event in a room was rejected. ([\#12729](#12729))
erikjohnston added a commit that referenced this pull request May 16, 2022
DMRobertson pushed a commit that referenced this pull request May 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
X-Release-Blocker Must be resolved before making a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/sync returns 404 with "Could not find event" if the last event in a room was rejected
3 participants