From c091089b16bd9954cfc69154a718a15235aec245 Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Tue, 21 Jul 2026 17:04:38 +0300 Subject: [PATCH] Add pointers for the lazy loaded caches pointing to https://github.com/element-hq/synapse/issues/19978 --- synapse/handlers/sync.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index c5868e94fe..443f3fb422 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -1072,6 +1072,8 @@ class SyncHandler: def get_lazy_loaded_members_cache( self, cache_key: tuple[str, str | None] ) -> LruCache[str, str]: + # FIXME: This cache may be subject to losing members in the case that + # a sync is interrupted and retried, see https://github.com/element-hq/synapse/issues/19978 cache: LruCache[str, str] | None = self.lazy_loaded_members_cache.get(cache_key) if cache is None: logger.debug("creating LruCache for %r", cache_key) @@ -1097,6 +1099,8 @@ class SyncHandler: We don't manually remove entries from this cache, though it may be ignored in cases where the sync must send the field down to the client. """ + # FIXME: This cache may be subject to losing field updates in the case that + # a sync is interrupted and retried, see https://github.com/element-hq/synapse/issues/19978 cache: LruCache[bytes, bytes] | None = ( self.lazy_loaded_profile_fields_cache.get(cache_key) )