fixes related to room v12 and sytest#19898
Open
FrenchGithubUser wants to merge 3 commits into
Open
Conversation
in version 12 rooms, whose room IDs no longer encode a server name
FrenchGithubUser
force-pushed
the
tt/room-v12
branch
from
June 30, 2026 15:11
a120428 to
e1e700b
Compare
rooms when the same user creates several rooms at once, due to colliding room IDs
FrenchGithubUser
force-pushed
the
tt/room-v12
branch
from
July 1, 2026 14:39
9f258fb to
ec8f6c4
Compare
FrenchGithubUser
marked this pull request as ready for review
July 1, 2026 15:06
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses two intermittent failures introduced/observed with room version 12 (MSC4291-style) rooms: (1) room ID collisions during concurrent /createRoom calls, and (2) third-party invite forwarding over federation incorrectly treating v12 room IDs as destination server names.
Changes:
- Add retry logic for MSC4291 room creation when the derived room ID collides, by perturbing
origin_server_ts. - Fix 3PID invite forwarding destination selection to avoid interpreting domainless v12 room IDs as federation destinations.
- Add a Towncrier newsfragment documenting both bugfixes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| synapse/handlers/room.py | Retries MSC4291 create-event generation on room ID collisions to avoid intermittent /createRoom 500s under concurrency. |
| synapse/handlers/federation.py | Adjusts 3PID invite forwarding destinations so v12+ room IDs without domains don’t trigger invalid-destination failures. |
| changelog.d/19898.bugfix | Adds release note entries for the two v12-related bugfixes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1454
to
+1456
| except StoreError: | ||
| attempts += 1 | ||
| continue |
Contributor
Author
There was a problem hiding this comment.
this mirrors the existing _generate_and_create_room_id, which swallows all StoreErrors the same way; distinguishing collisions from real errors is worth doing but as a separate cleanup to both
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discovered while writing matrix-org/sytest#1429
Those might be split into their separate PRs if necessary.
/createRoomintermittently failing with a 500 error in version 12 rooms when the same user creates several rooms at once, due to colliding room IDs.Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.