-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
The failed Sytest is failing on |
The other sytest failed because perl failed to install |
synapse/storage/account_data.py
Outdated
@@ -156,6 +157,38 @@ def get_account_data_for_room_txn(txn): | |||
"get_account_data_for_room", get_account_data_for_room_txn | |||
) | |||
|
|||
@cached(num_args=3, max_entries=5000) | |||
def get_account_data_for_room_and_type(self, user_id, room_id, account_data_type): | |||
"""Get all the client account_data for a user for a room. |
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.
LIES
synapse/storage/account_data.py
Outdated
room_id(str): The room to get the account_data for. | ||
account_data_type (str): The account data type to get. | ||
Returns: | ||
A deferred dict of the room account_data for that type, or None if |
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.
not necessarily a dict?
@@ -2033,7 +2033,7 @@ def is_event_after(self, event_id1, event_id2): | |||
to_2, so_2 = yield self._get_event_ordering(event_id2) | |||
defer.returnValue((to_1, so_1) > (to_2, so_2)) | |||
|
|||
@defer.inlineCallbacks | |||
@cachedInlineCallbacks(max_entries=5000) |
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'd really prefer it if we used
@cached()
@defer.inlineCallbacks
but I'm not going to argue too much about it
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.
Me too, but I think this is something to be investigated outside this PR.
We add a new storage function to get a paritcular type of room account data. This allows us to prefill the cache when updating that acount data.
5d72c68
to
4b44f05
Compare
(I've also added some sytests matrix-org/sytest#433)