-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
(I also split the functions into class-level private methods, because it was getting too crowded with 3 local functions) |
should_cache = all( | ||
self._safe_call(func, r, key=key) | ||
for func in self.pending_conditionals.pop(key, []) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for links: I've argued in #synapse-dev and https://github.com/matrix-org/synapse/pull/9358/files#r585481702 that we should only support one conditional per key, which simplifies this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add that to the "small changes to ResponseCache
PR", this one is focused on fixing #9507, i dont wanna drag everything else into here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #9525 for this
Folded into #9739 |
This fixes #9507 by making
ResponseCache
additionally not cache the result when;Previously, the latter could cause the cache not to be evicted inside the
errback
of theObservableDeferred
, because these conditionals would be evaluated (and have an exception thrown) before acallLater
or immidiate cache eviction could be done, this what caused #9507 (most likely).Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.Signed-off-by: Jonathan de Jong <[email protected]>
Fixes #9507