Matthew Hodgson
fb83f6a1fc
fix SQL based on PR feedback
2016-04-08 18:55:38 +01:00
Matthew Hodgson
d6e7333ae4
Merge branch 'develop' into matthew/preview_urls
2016-04-07 17:26:44 +01:00
Mark Haines
e815763b7f
Merge pull request #697 from matrix-org/markjh/slaveI
...
Add a slaved events store class
2016-04-06 16:19:25 +01:00
Erik Johnston
b713934b2e
Merge pull request #698 from matrix-org/erikj/port_script_fix
...
Don't require config to create database
2016-04-06 14:32:45 +01:00
Mark Haines
75fb9ac1be
Add a slaved events store class
...
Add a test to check that get_room_names_and_aliases does the same
thing on both the master and on the slave data store.
2016-04-06 14:18:35 +01:00
Erik Johnston
8aab9d87fa
Don't require config to create database
2016-04-06 14:15:45 +01:00
Mark Haines
7d11f825aa
Merge pull request #694 from matrix-org/markjh/caches
...
Move _get_cache_dict into the SQLBaseStore
2016-04-06 13:21:25 +01:00
Mark Haines
87f2dec8d4
Make the cache objects be per instance rather than being global
2016-04-06 13:08:05 +01:00
Mark Haines
a1e0d316ea
Move _get_cache_dict into the SQLBaseStore
2016-04-06 13:05:19 +01:00
Erik Johnston
b29f98377d
Merge pull request #691 from matrix-org/erikj/member
...
Fix stuck invites
2016-04-05 12:44:39 +01:00
Erik Johnston
df727f2126
Fix stuck invites
...
If rejecting a remote invite fails with an error response don't fail
the entire request; instead mark the invite as locally rejected.
This fixes the bug where users can get stuck invites which they can
neither accept nor reject.
2016-04-05 11:13:24 +01:00
Erik Johnston
7a77f8b6d5
Merge pull request #690 from matrix-org/erikj/member
...
Store invites in a separate table.
2016-04-05 09:12:27 +01:00
Erik Johnston
0c53d750e7
Docs and indents
2016-04-04 18:02:48 +01:00
Erik Johnston
92ab45a330
Add upgrade path, rename table
2016-04-04 17:07:43 +01:00
Erik Johnston
3d76b7cb2b
Store invites in a separate table.
2016-04-04 16:30:15 +01:00
Erik Johnston
bf14883a04
Merge pull request #689 from matrix-org/erikj/member
...
Do checks for memberships before creating events
2016-04-04 11:56:40 +01:00
Matthew Hodgson
9f7dc2bef7
Merge branch 'develop' into matthew/preview_urls
2016-04-04 00:38:21 +01:00
Matthew Hodgson
8b98a7e8c3
pep8
2016-04-03 12:56:29 +01:00
Matthew Hodgson
7426c86eb8
add a persistent cache of URL lookups, and fix up the in-memory one to work
2016-04-03 00:31:57 +01:00
Erik Johnston
d76d89323c
Use computed prev event ids
2016-04-01 17:39:32 +01:00
Mark Haines
89e6839a48
Merge pull request #686 from matrix-org/markjh/doc_strings
...
Use google style doc strings.
2016-04-01 16:20:09 +01:00
Mark Haines
2a37467fa1
Use google style doc strings.
...
pycharm supports them so there is no need to use the other format.
Might as well convert the existing strings to reduce the risk of
people accidentally cargo culting the wrong doc string format.
2016-04-01 16:12:07 +01:00
Mark Haines
f2b916534b
Merge pull request #684 from matrix-org/markjh/backfill_id_gen
...
Use a stream id generator for backfilled ids
2016-04-01 15:13:14 +01:00
Mark Haines
9bc5b4c663
Assert that the step != 0
2016-04-01 15:08:20 +01:00
Mark Haines
35b5c4ba1b
use google style doc strings
2016-04-01 15:07:01 +01:00
Mark Haines
a2866e2e6a
Rename direction to step, apply checks consistently
2016-04-01 13:50:54 +01:00
Mark Haines
e36bfbab38
Use a stream id generator for backfilled ids
2016-04-01 13:29:05 +01:00
Mark Haines
7753fc6570
Fix the invalidation of the names and aliases cache
2016-04-01 10:34:51 +01:00
Mark Haines
5d06929169
Move the check for backfilled outside the for loop
2016-03-31 15:09:09 +01:00
Mark Haines
76503f95ed
Remove the is_new_state argument to persist event.
...
Move the checks for whether an event is new state inside persist
event itself.
This was harder than expected because there wasn't enough information
passed to persist event to correctly handle invites from remote servers
for new rooms.
2016-03-31 15:00:42 +01:00
Mark Haines
62e395f0e3
Merge pull request #676 from matrix-org/markjh/replicate_stateIII
...
Add replication streams for ex outliers and current state resets
2016-03-31 11:20:57 +01:00
Mark Haines
2ec5426035
Use a namedtuple rather than tuple unpacking
2016-03-31 10:33:02 +01:00
Mark Haines
1fbb094c6f
Add replication streams for ex outliers and current state resets
2016-03-30 17:19:56 +01:00
Mark Haines
8b8052909f
return the state_group for backfill
2016-03-30 16:20:07 +01:00
Mark Haines
61407986b4
Add a entry to current_state_resets table when the current state is reset
2016-03-30 16:18:46 +01:00
Mark Haines
31a9eceda5
Add a replication stream for state groups
2016-03-30 16:01:58 +01:00
Mark Haines
1e25f62ee6
Use a stream id generator to assign state group ids
2016-03-30 12:55:02 +01:00
Erik Johnston
2f0180b09e
Don't bother interning keys that are already interned
2016-03-23 16:29:46 +00:00
Erik Johnston
acdfef7b14
Intern all the things
2016-03-23 16:25:54 +00:00
Erik Johnston
75daede92f
String intern
2016-03-23 14:53:53 +00:00
Erik Johnston
fbdeb1778d
Merge pull request #664 from matrix-org/erikj/public_room_list
...
Don't require alias in public room list.
2016-03-23 14:42:01 +00:00
Erik Johnston
b275765545
Comment about weird SQL
2016-03-23 14:15:32 +00:00
Erik Johnston
0c1a27b787
SQLite and postgres doesn't share a true literal
2016-03-23 14:10:49 +00:00
Erik Johnston
84afeb41f3
Ensure all old public rooms have aliases
2016-03-23 13:59:34 +00:00
Erik Johnston
2749da542c
Merge pull request #663 from matrix-org/erikj/invite_for_user
...
Make get_invites return RoomsForUser
2016-03-23 13:19:26 +00:00
Erik Johnston
e14baa7a3b
Merge pull request #665 from matrix-org/erikj/dont_cache_events
...
Only cache events in the event cache
2016-03-23 13:19:12 +00:00
Erik Johnston
d87a846ebc
Don't cache events in get_recent_events_for_room
2016-03-23 11:42:50 +00:00
Erik Johnston
8b0dfc9fc4
Don't cache events in get_current_state_for_key
2016-03-23 11:42:17 +00:00
Erik Johnston
b6507869cd
Make get_invites return RoomsForUser
2016-03-23 10:32:10 +00:00
Erik Johnston
99f929f36b
Make StateHandler._state_cache only store event_ids.
2016-03-22 16:06:04 +00:00