Mark Haines
cacf0688c6
Add a get_invites_for_user method to the storage to find out the rooms a user is invited to
2015-10-13 14:08:38 +01:00
Mark Haines
301141515a
Merge pull request #288 from matrix-org/markjh/unused_definitions
...
Remove some of the unused definitions from synapse
2015-09-28 14:22:44 +01:00
Mark Haines
cf1100887b
Fix order of ON constraints in _get_rooms_for_user_where_membership_is_txn
2015-09-24 17:35:10 +01:00
Mark Haines
e51aa4be96
synapse/storage/roommember.py:_get_members_query was unused
2015-09-23 10:35:10 +01:00
Mark Haines
417485eefa
Include the event_id and stream_ordering of membership events when looking up which rooms a user is in
2015-09-08 18:14:54 +01:00
Erik Johnston
2df8dd9b37
Move all the caches into their own package, synapse.util.caches
2015-08-11 18:00:59 +01:00
Erik Johnston
b8e386db59
Change Cache to not use *args in its interface
2015-08-07 11:52:21 +01:00
Erik Johnston
1e62a3d3a9
Up the cache size for 'get_joined_hosts_for_room' and 'get_users_in_room'
2015-08-05 15:40:40 +01:00
Erik Johnston
5130d80d79
Add bulk insert events API
2015-06-25 17:29:34 +01:00
Erik Johnston
4429e720ae
Merge branch 'master' of github.com:matrix-org/synapse into develop
2015-05-22 10:33:00 +01:00
Mark Haines
53447e9cd3
Add caches for things requested by the pushers
2015-05-21 16:41:39 +01:00
Erik Johnston
f6f902d459
Move fetching of events into their own transactions
2015-05-14 13:45:48 +01:00
Mark Haines
d18f37e026
Collect the invalidate callbacks on the transaction object rather than passing around a separate list
2015-05-05 17:32:21 +01:00
Mark Haines
a9aea68fd5
Invalidate the caches from the correct thread
2015-05-05 14:57:08 +01:00
Erik Johnston
61d05daab1
More join conditions
2015-04-30 18:41:05 +01:00
Erik Johnston
6ead27ddda
Add more conditions on JOINs to make postgres go a little faster.
2015-04-30 18:32:03 +01:00
Erik Johnston
69d4063651
Add get_rooms_for_user cache
2015-04-30 16:47:51 +01:00
Erik Johnston
0bfa78b39b
PEP8
2015-04-07 12:16:05 +01:00
Erik Johnston
5a447098dd
Don't use room hosts table
2015-03-24 16:19:24 +00:00
Erik Johnston
9a7f496298
Sanitize RoomMemberStore
2015-03-23 15:29:04 +00:00
Erik Johnston
f6583796fe
Merge branch 'develop' of github.com:matrix-org/synapse into mysql
2015-03-20 16:31:48 +00:00
Erik Johnston
dc0c989ef4
Give sensible names for '_simple_...' transactions
2015-03-20 15:59:18 +00:00
Erik Johnston
d7a0496f3e
Convert storage layer to be mysql compatible
2015-03-19 15:59:48 +00:00
Kegan Dougal
cb97ea3ec2
PEP8
2015-03-02 11:23:46 +00:00
Kegan Dougal
377ae369c1
Wrap all of get_app_service_rooms in a txn.
2015-03-02 11:20:51 +00:00
Paul "LeoNerd" Evans
357fba2c24
RoomMemberStore no longer needs a _user_rooms_cache member
2015-02-23 15:57:41 +00:00
Paul "LeoNerd" Evans
ebc3db295b
Take named arguments to @cached() decorator, add a 'max_entries' limit
2015-02-19 18:36:02 +00:00
Paul "LeoNerd" Evans
077d200342
Move @cached decorator out into synapse.storage._base; add minimal docs
2015-02-19 17:29:39 +00:00
Paul "LeoNerd" Evans
61959928bb
Pull out the 'get_rooms_for_user' cache logic into a reüsable @cached decorator
2015-02-19 14:58:07 +00:00
Erik Johnston
72a4de2ce6
Use consumeErrors=True on all DeferredLists.
...
This is so that the DeferredLists actually consume the error instead of
propogating down the non-existent errback chain. This should reduce the
number of unhandled errors we are seeing.
2015-02-17 10:07:01 +00:00
Paul "LeoNerd" Evans
7f47ba7383
Added another TODO note
2015-02-11 16:18:21 +00:00
Paul "LeoNerd" Evans
45b56609ae
Cache the result of a get_rooms_for_user query, to make user_rooms_intersect() much lighter in the read-common case
2015-02-11 16:04:08 +00:00
Paul "LeoNerd" Evans
7be0f6594e
First step of making user_rooms_intersect() faster - implement in intersection logic in Python code terms of a DB query that is cacheable per user
2015-02-11 15:53:56 +00:00
Mark Haines
5759bec43c
Replace hs.parse_userid with UserID.from_string
2015-01-23 11:47:15 +00:00
Erik Johnston
8a12df8cf3
Merge branch 'erikj-perf' of github.com:matrix-org/synapse into develop
2015-01-06 14:45:57 +00:00
Erik Johnston
96707ed718
Name 'user_rooms_intersect' transaction
2015-01-06 14:44:27 +00:00
Erik Johnston
76ec154e95
We don't need the full events for get_rooms_for_user_where_membership_is
2015-01-06 14:37:00 +00:00
Mark Haines
5e23a19204
Merge pull request #28 from matrix-org/erikj-perf
...
Database performance improvements.
2015-01-06 13:33:40 +00:00
Mark Haines
adb04b1e57
Update copyright notices
2015-01-06 13:21:39 +00:00
Erik Johnston
f0128f9600
Add RoomMemberStore.get_users_in_room, so that we can get the list of joined users without having to retrieve the full events
2015-01-06 10:55:43 +00:00
Erik Johnston
f3788e3c78
Test some ideas that might help performance a bit
2014-12-17 23:37:08 +00:00
Paul "LeoNerd" Evans
10eb8f070c
Workaround for non-uniqueness of room member events in the database confusing HAVING COUNT() test of room membership intersection (with thanks to Tom Molesworth)
2014-12-02 21:36:53 +00:00
Mark Haines
32090aee16
Add a few missing yields, Move deferred lists inside PreserveLoggingContext because they don't interact well with the logging contexts
2014-11-20 16:24:00 +00:00
Mark Haines
7d709542ca
Fix pep8 warnings
2014-10-30 11:10:17 +00:00
Erik Johnston
fbf6320614
pyflakes cleanup
2014-09-30 12:38:38 +01:00
Erik Johnston
c818aa13eb
Add LIMIT to scalar subquery
2014-09-25 15:51:21 +01:00
Erik Johnston
70899d3ab2
Rename deletions to redactions
2014-09-24 15:27:59 +01:00
Erik Johnston
78af6bbb98
Add m.room.deletion. If an event is deleted it will be returned to clients 'pruned', i.e. all client specified keys will be removed.
2014-09-23 15:28:32 +01:00
Paul "LeoNerd" Evans
b0406b9ead
Merge remote-tracking branch 'origin/develop' into test-sqlite-memory
2014-09-15 14:15:10 +01:00
Erik Johnston
14975ce5bc
Fix bug where we relied on the current_state_events being updated when we are handling type specific persistence
2014-09-12 17:57:02 +01:00