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

Delete stale non-e2e devices for users, take 3#15183

Merged
erikjohnston merged 5 commits into
developfrom
erikj/delete_devices3
Mar 29, 2023
Merged

Delete stale non-e2e devices for users, take 3#15183
erikjohnston merged 5 commits into
developfrom
erikj/delete_devices3

Conversation

@erikjohnston
Copy link
Copy Markdown
Member

This should help reduce the number of devices e.g. simple bots the repeatedly login rack up.

We only delete non-e2e devices as they should be safe to delete, whereas if we delete e2e devices for a user we may accidentally break their ability to receive e2e keys for a message.

Basically #14595, but makes sure that we only have one delete going per-person at a time, and with a longer timeout.

@erikjohnston erikjohnston force-pushed the erikj/delete_devices3 branch from 9b7ce98 to dd45814 Compare March 2, 2023 11:27
@erikjohnston erikjohnston marked this pull request as ready for review March 2, 2023 11:38
@erikjohnston erikjohnston requested a review from a team as a code owner March 2, 2023 11:38
This should help reduce the number of devices e.g. simple bots the repeatedly login rack up.

We only delete non-e2e devices as they should be safe to delete, whereas if we delete e2e devices for a user we may accidentally break their ability to receive e2e keys for a message.
@erikjohnston erikjohnston force-pushed the erikj/delete_devices3 branch from dd45814 to cb63591 Compare March 2, 2023 11:54
Comment thread synapse/handlers/register.py
Comment thread synapse/handlers/register.py Outdated
Comment thread synapse/storage/databases/main/devices.py Outdated
Comment thread synapse/storage/databases/main/devices.py
erikjohnston and others added 3 commits March 6, 2023 10:06
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
@erikjohnston erikjohnston requested a review from clokep March 6, 2023 10:10
Comment thread synapse/storage/databases/main/devices.py Outdated
Copy link
Copy Markdown
Member

@clokep clokep left a comment

Choose a reason for hiding this comment

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

Lets give it a go.

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
@erikjohnston
Copy link
Copy Markdown
Member Author

Waiting to merge this until we are ready to put this on matrix.org, as previous iterations of this change have caused production issues.

@erikjohnston erikjohnston merged commit 78cdb72 into develop Mar 29, 2023
@erikjohnston erikjohnston deleted the erikj/delete_devices3 branch March 29, 2023 11:07
erikjohnston added a commit that referenced this pull request Mar 31, 2023
erikjohnston added a commit that referenced this pull request Mar 31, 2023
* Revert "Fix registering a device on an account with lots of devices (#15348)"

This reverts commit f0d8f66.

* Revert "Delete stale non-e2e devices for users, take 3 (#15183)"

This reverts commit 78cdb72.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants