mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-01 15:23:09 +00:00
![]() Fix https://github.com/matrix-org/synapse/issues/13856 Fix https://github.com/matrix-org/synapse/issues/13865 > Discovered while trying to make Synapse fast enough for [this MSC2716 test for importing many batches](https://github.com/matrix-org/complement/pull/214#discussion_r741678240). As an example, disabling the `have_seen_event` cache saves 10 seconds for each `/messages` request in that MSC2716 Complement test because we're not making as many federation requests for `/state` (speeding up `have_seen_event` itself is related to https://github.com/matrix-org/synapse/issues/13625) > > But this will also make `/messages` faster in general so we can include it in the [faster `/messages` milestone](https://github.com/matrix-org/synapse/milestone/11). > > *-- https://github.com/matrix-org/synapse/issues/13856* ### The problem `_invalidate_caches_for_event` doesn't run in monolith mode which means we never even tried to clear the `have_seen_event` and other caches. And even in worker mode, it only runs on the workers, not the master (AFAICT). Additionally there was bug with the key being wrong so `_invalidate_caches_for_event` never invalidates the `have_seen_event` cache even when it does run. Because we were using the `@cachedList` wrong, it was putting items in the cache under keys like `((room_id, event_id),)` with a `set` in a `set` (ex. `(('!TnCIJPKzdQdUlIyXdQ:test', '$Iu0eqEBN7qcyF1S9B3oNB3I91v2o5YOgRNPwi_78s-k'),)`) and we we're trying to invalidate with just `(room_id, event_id)` which did nothing. |
||
---|---|---|
.. | ||
.gitignore | ||
13635.feature | ||
13667.feature | ||
13722.feature | ||
13768.misc | ||
13772.doc | ||
13782.feature | ||
13792.misc | ||
13796.misc | ||
13799.feature | ||
13809.misc | ||
13818.doc | ||
13823.misc | ||
13830.bugfix | ||
13831.feature | ||
13832.feature | ||
13836.doc | ||
13839.misc | ||
13840.bugfix | ||
13843.removal | ||
13850.misc | ||
13855.bugfix | ||
13859.misc | ||
13860.feature | ||
13863.bugfix | ||
13867.misc | ||
13870.doc | ||
13872.bugfix | ||
13873.misc | ||
13874.misc | ||
13876.misc | ||
13885.misc | ||
13888.misc | ||
13889.misc | ||
13892.feature | ||
13893.feature | ||
13905.misc | ||
13909.bugfix | ||
13911.doc | ||
13914.misc | ||
13915.doc | ||
13920.feature | ||
13922.bugfix |