summary refs log tree commit diff
diff options
context:
space:
mode:
authorSean Quah <seanq@matrix.org>2022-09-13 16:18:43 +0100
committerSean Quah <seanq@matrix.org>2022-09-13 16:18:43 +0100
commitd40ccbe86f73d2405da1648c0b70f4f59062953e (patch)
tree4413e77d65a5ad87d1a4b2a6ff4ad2f3a7442d44
parentMerge branch 'develop' into squah/fix_remote_user_leave_device_list_tracking (diff)
downloadsynapse-github/squah/test_device_list_tracking.tar.xz
-rw-r--r--synapse/handlers/e2e_keys.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/e2e_keys.py b/synapse/handlers/e2e_keys.py
index b26067200c..8eed63ccf3 100644
--- a/synapse/handlers/e2e_keys.py
+++ b/synapse/handlers/e2e_keys.py
@@ -188,11 +188,13 @@ class E2eKeysHandler:
                 )
                 invalid_cached_users = cached_users - valid_cached_users
                 if invalid_cached_users:
-                    # Fix up results. If we get here there may be bugs in device list
-                    # tracking.
+                    # Fix up results. If we get here, there is either a bug in device
+                    # list tracking, or we hit the race mentioned above.
                     user_ids_not_in_cache.update(invalid_cached_users)
                     for invalid_user_id in invalid_cached_users:
                         remote_results.pop(invalid_user_id)
+                    # This log message may be removed if it turns out it's almost
+                    # entirely triggered by races.
                     logger.error(
                         "Devices for %s were cached, but the server no longer shares "
                         "any rooms with them. The cached device lists are stale.",