summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--changelog.d/11212.bugfix1
-rw-r--r--synapse/storage/databases/main/deviceinbox.py2
-rw-r--r--synapse/storage/schema/main/delta/64/02remove_deleted_devices_from_device_inbox.sql2
3 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/11212.bugfix b/changelog.d/11212.bugfix
new file mode 100644
index 0000000000..ba6efab25b
--- /dev/null
+++ b/changelog.d/11212.bugfix
@@ -0,0 +1 @@
+Fix a long-standing bug where messages in the `device_inbox` table for deleted devices would persist indefinitely. Contributed by @dklimpel and @JohannesKleine.
\ No newline at end of file
diff --git a/synapse/storage/databases/main/deviceinbox.py b/synapse/storage/databases/main/deviceinbox.py
index b0ccab0c9b..d03b5e5a7d 100644
--- a/synapse/storage/databases/main/deviceinbox.py
+++ b/synapse/storage/databases/main/deviceinbox.py
@@ -594,7 +594,7 @@ class DeviceInboxBackgroundUpdateStore(SQLBaseStore):
     ) -> int:
         """A background update that deletes all device_inboxes for deleted devices.
 
-        This should only need to be run once (when users upgrade to v1.46.0)
+        This should only need to be run once (when users upgrade to v1.47.0)
 
         Args:
             progress: JsonDict used to store progress of this background update
diff --git a/synapse/storage/schema/main/delta/64/02remove_deleted_devices_from_device_inbox.sql b/synapse/storage/schema/main/delta/64/02remove_deleted_devices_from_device_inbox.sql
index efe702f621..fca7290741 100644
--- a/synapse/storage/schema/main/delta/64/02remove_deleted_devices_from_device_inbox.sql
+++ b/synapse/storage/schema/main/delta/64/02remove_deleted_devices_from_device_inbox.sql
@@ -15,7 +15,7 @@
 
 
 -- Remove messages from the device_inbox table which were orphaned
--- when a device was deleted using Synapse earlier than 1.46.0.
+-- when a device was deleted using Synapse earlier than 1.47.0.
 -- This runs as background task, but may take a bit to finish.
 
 INSERT INTO background_updates (ordering, update_name, progress_json) VALUES