Skip to content

Lock /createRoom calls#800

Merged
kegsay merged 3 commits into
mainfrom
kegan/lock-create-room
Oct 6, 2025
Merged

Lock /createRoom calls#800
kegsay merged 3 commits into
mainfrom
kegan/lock-create-room

Conversation

@kegsay
Copy link
Copy Markdown
Member

@kegsay kegsay commented Sep 1, 2025

To reduce the chance of multiple rooms being made in the same millisecond which makes v12 rooms unhappy as it causes the same room ID to be generated. This causes flakey tests on v12.

To reduce the chance of multiple rooms being made in the same
millisecond which makes v12 rooms unhappy as it causes the same
room ID to be generated.
@kegsay kegsay requested review from a team as code owners September 1, 2025 16:02
Copy link
Copy Markdown
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Copy Markdown
Collaborator

@MadLittleMods MadLittleMods left a comment

Choose a reason for hiding this comment

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

Fine if you want to push forward with this direction

Comment thread client/client.go
@@ -14,6 +14,7 @@ import (
"net/url"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

To reduce the chance of multiple rooms being made in the same millisecond which makes v12 rooms unhappy as it causes the same room ID to be generated. This causes flakey tests on v12.

To be clear, the homeserver implementations prevent this (I assume) like Synapse with UNIQUE database constraints?

We're just wanting to workaround the problem of not complicating the tests from having to retry /createRoom requests.

Kinda feels like the homeserver implementations should be able to handle this gracefully.

Comment thread client/client.go Outdated
@kegsay kegsay merged commit 10fee65 into main Oct 6, 2025
4 checks passed
@kegsay kegsay deleted the kegan/lock-create-room branch October 6, 2025 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants