-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Don't upgrade a room if there's already an ongoing upgrade #4583
Comments
So we put a linearizer in place, which is great, but all it does is make one room upgrade happen after another, rather than preventing the second one from happening at all. |
Another problem seems to be that we can upgrade a room over and over again, even after it's already been upgraded. |
There seems to be some debate about whether that's a bug or a feature: https://github.com/matrix-org/matrix-doc/issues/1937. |
ughhhhhhhhh Edit: He brings up a good point though. We need to have some spec discussion before we go ahead and stop a room from being upgraded twice. However the issue of a room being upgraded twice at the same time can still be mitigated now (just not as cleanly). |
After some discussion we've decided to go with the following solutions to the following use cases:
Allow them to.
Let the first one received go through and send an error message to the second.
Send the same response to the second. Will update #5051 to reflect this. Edit: Done. |
Closes #4583 Does slightly less than #5045, which prevented a room from being upgraded multiple times, one after another. This PR still allows that, but just prevents two from happening at the same time. Mostly just to mitigate the fact that servers are slow and it can take a moment for the room upgrade to actually complete. We don't want people sending another request to upgrade the room when really they just thought the first didn't go through.
Fixed in #5051 |
Basically I tried upgrading a room at a time my server had some lag. Not seeing any kind of feedback in Riot after a short amount of time, I ran
/upgraderoom
a second time, which caused two tombstone events to be sent to the same v1 room, referencing two separate v3 rooms. Additionally, the UI got confused which caused me to left the wrong room, so the upgraded room isn't joinable by anyone.Before initiating a room upgrade, Synapse should check if there's already an upgrade ongoing for the same room, and return an error if there is.
The text was updated successfully, but these errors were encountered: