-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
This allows registration to be handled by a worker, though the actual write to the database still happens on master. Note: due to the in-memory session map all registration requests must be handled by the same worker.
Note: the changes to |
Codecov Report
@@ Coverage Diff @@
## develop #4666 +/- ##
===========================================
- Coverage 75.27% 75.08% -0.19%
===========================================
Files 338 340 +2
Lines 34620 34828 +208
Branches 5669 5723 +54
===========================================
+ Hits 26060 26152 +92
- Misses 6967 7070 +103
- Partials 1593 1606 +13 |
Co-Authored-By: erikjohnston <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally lgtm
synapse/replication/http/login.py
Outdated
initial_display_name = content["initial_display_name"] | ||
is_guest = content["is_guest"] | ||
|
||
device_id = yield self.device_handler.check_device_registered( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we didn't have to duplicate this code between the rest
code and here. Can it not find a handler to go and live in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put it in RegistrationHandler
. I was going to put it in LoginHandler
, then AuthHandler
and then DeviceHandler
, but they all had various problems that made me cry, so I gave up and put it in RegistrationHandler
.
I'm afraid I had to fix the tests to not mock out all the registration handler stuff, as otherwise I would have ended up mocking out literally everything to make the tests pass, which feels counter productive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This allows registration to be handled by a worker, though the actual
write to the database still happens on master.
Note: due to the in-memory session map all registration requests must be
handled by the same worker.