Richard van der Hoff
adfc0c9539
docstring for get_current_state_ids
2018-01-29 17:39:55 +00:00
Richard van der Hoff
d413a2ba98
Remove unused "event_type" param on state.get_current_state_ids
...
this param doesn't seem to be used, and is a bit pointless anyway because it
can easily be replicated by the caller. It is also horrible, because it changes
the return type of the method.
2018-01-29 17:06:57 +00:00
Richard van der Hoff
390093d45e
Split resolve_events into two functions
...
... so that the return type doesn't depend on the arg types
2018-01-17 15:44:31 +00:00
Richard van der Hoff
eaaabc6c4f
replace 'except:' with 'except Exception:'
...
what could possibly go wrong
2017-10-23 15:52:32 +01:00
Richard van der Hoff
3ddda939d3
some comments in the state res code
2017-10-05 14:58:17 +01:00
Erik Johnston
b5e8d529e6
Define CACHE_SIZE_FACTOR once
2017-07-04 09:56:44 +01:00
Erik Johnston
0185b75381
Change is_host_joined to use current_state table
...
This bypasses a bug where using the state groups to figure out if a host
is in a room sometimes errors if the servers isn't in the room. (For
example when the server rejected an invite to a remote room)
2017-06-09 10:52:26 +01:00
Erik Johnston
ea11ee09f3
Ensure we don't use unpersisted state group as prev group
2017-06-08 11:59:57 +01:00
Erik Johnston
09e4bc0501
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/state_fixup
2017-06-07 11:05:23 +01:00
Erik Johnston
6e2a7ee1bc
Remove spurious log lines
2017-06-07 11:05:17 +01:00
Erik Johnston
350622a107
Handle the server leaving a public room
2017-05-31 15:11:36 +01:00
Erik Johnston
619e8ecd0c
Handle None state group correctly
2017-05-26 10:46:03 +01:00
Erik Johnston
dfbda5e025
Faster cache for get_joined_hosts
2017-05-25 17:24:44 +01:00
Erik Johnston
2b03751c3c
Don't return weird prev_group
2017-05-25 14:47:39 +01:00
Erik Johnston
dbc0dfd2d5
Remove unused options
2017-05-25 14:28:34 +01:00
Erik Johnston
dfaa58f72d
Fix comment and num args
2017-05-04 14:50:24 +01:00
Erik Johnston
7166854f41
Add cache for get_current_hosts_in_room
2017-05-02 10:36:35 +01:00
Erik Johnston
b9c2ae6788
Merge pull request #1849 from matrix-org/erikj/state_typo
...
Fix bug where current_state_events renamed to current_state_ids
2017-03-29 11:53:42 +01:00
Richard van der Hoff
5068fb16a5
Refactoring and cleanups
...
A few non-functional changes:
* A bunch of docstrings to document types
* Split `EventsStore._persist_events_txn` up a bit. Hopefully it's a bit more
readable.
* Rephrase `EventFederationStore._update_min_depth_for_room_txn` to avoid
mind-bending conditional.
* Rephrase rejected/outlier conditional in `_update_outliers_txn` to avoid
mind-bending conditional.
2017-03-17 15:06:07 +00:00
Erik Johnston
41dab8a222
Fix bug where current_state_events renamed to current_state_ids
2017-01-23 15:22:48 +00:00
Erik Johnston
09eb08f910
Derive current_state_events from state groups
2017-01-20 11:52:51 +00:00
Erik Johnston
f9058ca785
Merge pull request #1822 from matrix-org/erikj/statE_logging
...
Change resolve_state_groups call site logging to DEBUG
2017-01-18 11:02:03 +00:00
Erik Johnston
15f012032c
Merge pull request #1818 from matrix-org/erikj/state_auth_splitout_split
...
Optimise state resolution
2017-01-18 10:53:00 +00:00
Erik Johnston
5f027d1fc5
Change resolve_state_groups call site logging to DEBUG
2017-01-17 17:07:15 +00:00
Erik Johnston
ed4d176152
PEP8
2017-01-17 15:27:28 +00:00
Mark Haines
c6064a7ba6
Only construct sets when necessary
2017-01-17 15:23:07 +00:00
Erik Johnston
a8594fd19f
Use better names
2017-01-17 14:59:03 +00:00
Erik Johnston
ce59a2faad
Correctly handle case of rejected events in state res
2017-01-17 14:18:53 +00:00
Erik Johnston
633f97151c
Check event is in state_map
2017-01-17 13:33:54 +00:00
Erik Johnston
5d6bad1b3c
Optimise state resolution
2017-01-17 13:22:19 +00:00
Erik Johnston
e8ecbb6f20
Merge pull request #1812 from matrix-org/erikj/state_auth_splitout_split
...
Split out static state methods from StateHandler
2017-01-17 11:55:18 +00:00
Erik Johnston
897f8752da
Up cache max entries for state
2017-01-16 15:08:17 +00:00
Erik Johnston
beda469bc6
Put staticmethods at module level
2017-01-16 15:05:24 +00:00
Erik Johnston
46aebbbcbf
Add support for 'iterable' to ExpiringCache
2017-01-16 14:57:23 +00:00
Erik Johnston
ec0a523ac3
Split out static state methods from StateHandler
2017-01-13 15:25:06 +00:00
Erik Johnston
f7085ac84f
Name linearizer's for better logs
2017-01-09 17:17:10 +00:00
Matthew Hodgson
4086026524
move logging to right place
2017-01-07 00:41:46 +00:00
Mark Haines
c18f7fc410
Fix flake8 and update changelog
2017-01-05 13:50:22 +00:00
Matthew Hodgson
d79d165761
add logging for all the places we call resolve_state_groups. my kingdom for a backtrace that actually works.
2017-01-05 13:40:39 +00:00
Erik Johnston
e457034e99
Merge pull request #1121 from matrix-org/erikj/public_room_paginate
...
Add pagination support to publicRooms
2016-09-15 13:27:09 +01:00
Erik Johnston
772c6067a3
Refactor public rooms to not pull out the full state for each room
2016-09-14 17:29:25 +01:00
Erik Johnston
f2b2cd8eb4
Amalgamate two identical consecutive if statements
2016-09-14 11:16:22 +01:00
Erik Johnston
d5ae1f1291
Ensure we don't mutate state cache entries
2016-09-14 10:03:48 +01:00
Erik Johnston
657847e4c6
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/state_storage
2016-09-02 11:04:48 +01:00
Erik Johnston
051a9ea921
Linearize state resolution to help caches
2016-09-01 14:55:03 +01:00
Erik Johnston
9e25443db8
Move to storing state_groups_state as deltas
2016-09-01 14:31:26 +01:00
Erik Johnston
ed7a703d4c
Handle the fact that workers can't generate state groups
2016-08-31 15:53:19 +01:00
Erik Johnston
f51888530d
Always specify state_group so that its in the cache
2016-08-31 14:58:11 +01:00
Erik Johnston
c10cb581c6
Correctly handle the difference between prev and current state
2016-08-31 14:26:22 +01:00
Erik Johnston
1bb8ec296d
Generate state group ids in state layer
2016-08-31 10:09:46 +01:00