summary refs log tree commit diff
path: root/synapse/storage/state.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix annoying typosMatthew Hodgson2017-01-051-1/+1
|
* Correctly intern keys in state cacheErik Johnston2016-11-081-1/+4
|
* Remove duplicationErik Johnston2016-09-271-31/+19
|
* Remove unused variableErik Johnston2016-09-271-3/+0
|
* Fix perf of fetching state in SQLiteErik Johnston2016-09-261-20/+41
|
* Fix reindexErik Johnston2016-09-141-15/+16
|
* Ensure we don't mutate state cache entriesErik Johnston2016-09-141-20/+25
|
* Create new index concurrentlyErik Johnston2016-09-121-1/+1
|
* Change state fetch query for postgres to be fasterErik Johnston2016-09-121-19/+35
| | | | | | It turns out that postgres doesn't like doing a list of OR's and is about 1000x slower, so we just issue a query for each specific type seperately.
* Reindex state_groups_state after pruningErik Johnston2016-09-081-0/+33
|
* Temporarily disable sequential scans for state fetchingErik Johnston2016-09-081-0/+4
|
* CommentErik Johnston2016-09-071-0/+4
|
* Add appopriate framing clauseErik Johnston2016-09-071-0/+1
|
* Use windowing function to make use of indexErik Johnston2016-09-071-5/+5
|
* Scale the batch size so that we're not bitten by the minimumErik Johnston2016-09-051-1/+5
|
* Correctly handle reindexing state groups that already have an edgeErik Johnston2016-09-051-0/+19
|
* Take value in a better wayErik Johnston2016-09-051-2/+2
|
* Comment about sqlite and WITH RECURSIVEErik Johnston2016-09-051-0/+4
|
* Add commentsErik Johnston2016-09-051-41/+38
|
* Add upgrade script that will slowly prune state_groups_state entriesErik Johnston2016-09-051-75/+203
|
* Limit the length of state chainsErik Johnston2016-09-021-22/+78
|
* Move to storing state_groups_state as deltasErik Johnston2016-09-011-59/+102
|
* Use state_groups table to test existenceErik Johnston2016-08-311-1/+1
|
* Correctly handle the difference between prev and current stateErik Johnston2016-08-311-3/+0
|
* Generate state group ids in state layerErik Johnston2016-08-311-7/+17
|
* Make _state_groups_id_gen a normal IdGeneratorErik Johnston2016-08-301-3/+0
|
* Make sync not pull out full stateErik Johnston2016-08-251-0/+33
|
* Replace context.current_state with context.current_state_idsErik Johnston2016-08-251-8/+8
|
* Pull out event ids rather than full events for stateErik Johnston2016-08-251-17/+38
|
* Remove lru optionErik Johnston2016-08-191-2/+2
|
* Add cache to _get_state_groups_from_groupsErik Johnston2016-04-191-3/+16
|
* Make the cache objects be per instance rather than being globalMark Haines2016-04-061-2/+2
|
* Merge pull request #686 from matrix-org/markjh/doc_stringsMark Haines2016-04-011-5/+8
|\ | | | | Use google style doc strings.
| * Use google style doc strings.Mark Haines2016-04-011-5/+8
| | | | | | | | | | | | | | 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.
* | Use a stream id generator for backfilled idsMark Haines2016-04-011-1/+1
|/
* Add a replication stream for state groupsMark Haines2016-03-301-0/+30
|
* Use a stream id generator to assign state group idsMark Haines2016-03-301-8/+8
|
* Don't bother interning keys that are already internedErik Johnston2016-03-231-3/+1
|
* Intern all the thingsErik Johnston2016-03-231-5/+5
|
* String internErik Johnston2016-03-231-3/+9
|
* Don't cache events in get_current_state_for_keyErik Johnston2016-03-231-7/+9
|
* Don't cache events in _state_group_cacheErik Johnston2016-03-221-60/+48
| | | | | | | | | Instead, simply cache the event ids, relying on the event cache to cache the actual events. The problem was that while the state groups cache was limited in the number of groups it could hold, each individual group could consist of thousands of events.
* Load the current id in the IdGenerator constructorMark Haines2016-03-011-1/+1
| | | | | | | | | Rather than loading them lazily. This allows us to remove all the yield statements and spurious arguments for the get_next methods. It also allows us to replace all instances of get_next_txn with get_next since get_next no longer needs to access the db.
* Batch fetch _get_state_groups_from_groupsErik Johnston2016-02-101-32/+34
|
* Use _simple_select_many for _get_state_group_for_eventsErik Johnston2016-02-101-16/+10
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Fix a few race conditions in the state calculationRichard van der Hoff2015-11-131-0/+14
| | | | | | | | | | | | | | | | | | | Be a bit more careful about how we calculate the state to be returned by /sync. In a few places, it was possible for /sync to return slightly later state than that represented by the next_batch token and the timeline. In particular, the following cases were susceptible: * On a full state sync, for an active room * During a per-room incremental sync with a timeline gap * When the user has just joined a room. (Refactor check_joined_room to make it less magical) Also, use store.get_state_for_events() (and thus the existing stategroups) to calculate the state corresponding to a particular sync position, rather than state_handler.compute_event_context(), which recalculates from first principles (and tends to miss some state). Merged from PR https://github.com/matrix-org/synapse/pull/372
* Remove unused room_id parameterErik Johnston2015-10-121-6/+5
|
* synapse/storage/state.py: _make_group_id was unusedMark Haines2015-09-231-6/+0
|
* Actually check if event_id isn't returned by _get_state_groupsErik Johnston2015-08-211-2/+9
|
* Remove newline because vertical whitespace makes mjark sadErik Johnston2015-08-181-2/+1
|
* Rejig the code to make it nicerErik Johnston2015-08-181-3/+2
|
* Ensure we never return a None event from _get_state_for_groupsErik Johnston2015-08-181-3/+8
|
* Reduce cache size from obscenely large to quite largeErik Johnston2015-08-181-1/+1
|
* Fix bug where we were leaking None into state event listsErik Johnston2015-08-171-2/+3
|
* Remove some vertical spaceErik Johnston2015-08-131-36/+9
|
* Replace list comprehensionErik Johnston2015-08-131-8/+3
|
* CommentErik Johnston2015-08-121-1/+2
|
* Explain why we're prefilling dict with NonesErik Johnston2015-08-121-0/+4
|
* Better variable nameErik Johnston2015-08-121-5/+5
|
* Split _get_state_for_group_from_cache into twoErik Johnston2015-08-121-32/+53
|
* Move all the caches into their own package, synapse.util.cachesErik Johnston2015-08-111-1/+4
|
* CommentsErik Johnston2015-08-111-3/+11
|
* Fix application of ACLsErik Johnston2015-08-111-3/+3
|
* Fix state cacheErik Johnston2015-08-111-36/+49
|
* Clean up StateStoreErik Johnston2015-08-101-62/+11
|
* Remove unused functionErik Johnston2015-08-101-7/+0
|
* Do bounds checkErik Johnston2015-08-101-1/+4
|
* Line lengthErik Johnston2015-08-101-1/+2
|
* Merge branch 'erikj/cache_varargs_interface' of ↵Erik Johnston2015-08-071-1/+0
|\ | | | | | | github.com:matrix-org/synapse into erikj/dictionary_cache
| * Remove unnecessary cacheErik Johnston2015-08-071-2/+1
| |
* | Batch up various DB requests for event -> stateErik Johnston2015-08-071-77/+142
| |
* | Remove unncessary cacheErik Johnston2015-08-071-1/+0
| |
* | Store absence of state in cacheErik Johnston2015-08-071-6/+16
| |
* | Merge branch 'erikj/cached_keyword_args' of github.com:matrix-org/synapse ↵Erik Johnston2015-08-051-3/+2
|\| | | | | | | into erikj/dictionary_cache
| * Add support for using keyword arguments with cached functionsErik Johnston2015-07-271-3/+2
| |
* | Use dictionary cache to do group -> state fetchingErik Johnston2015-08-051-65/+126
| |
* | Add commentErik Johnston2015-08-041-0/+15
| |
* | Speed up event filtering (for ACL) logicErik Johnston2015-08-041-38/+79
|/
* Merge pull request #193 from matrix-org/erikj/bulk_persist_eventErik Johnston2015-07-141-12/+24
|\ | | | | Add bulk insert events API
| * Add bulk insert events APIErik Johnston2015-06-251-12/+24
| |
* | Add basic impl for room history ACL on GET /messages client APIErik Johnston2015-07-021-2/+61
|/
* Add cache to get_state_groupsErik Johnston2015-06-031-8/+12
|
* Merge branch 'master' of github.com:matrix-org/synapse into developErik Johnston2015-05-221-1/+24
|\
| * Add a cache for get_current_state with state_keyMark Haines2015-05-211-1/+24
| |
* | Don't fetch prev_content for current_stateErik Johnston2015-05-151-1/+1
| |
* | Make store.get_current_state fetch events asynclyErik Johnston2015-05-151-3/+4
| |
* | Move fetching of events into their own transactionsErik Johnston2015-05-141-2/+0
| |
* | Refactor _get_eventsErik Johnston2015-05-141-1/+1
| |
* | Fetch events from events_id in their own transactionsErik Johnston2015-05-131-5/+5
| |
* | Fetch events in bulkErik Johnston2015-05-131-21/+1
| |
* | Don't fetch redaction and rejection stuff for each event, so we can use ↵Erik Johnston2015-05-131-2/+5
| | | | | | | | index only scan
* | Temp turn off checking for rejections and redactionsErik Johnston2015-05-131-5/+2
| |
* | defer.gatherResults loopErik Johnston2015-05-131-1/+7
| |
* | Batch fetching of events for state groupsErik Johnston2015-05-131-1/+24
| |
* | Load events for state group seperatelyErik Johnston2015-05-131-3/+9
|/
* Add support for using executemanyErik Johnston2015-05-051-7/+9
|
* Remove pointless joinErik Johnston2015-04-301-5/+4
|
* Need more yieldErik Johnston2015-04-301-1/+1
|
* Add missing paramErik Johnston2015-04-301-1/+1
|
* Fix up get_current_state and get_room_name_and_aliases queries to parse ↵Erik Johnston2015-04-301-16/+19
| | | | events in transaction
* Don't use sub queries, it makes postgres sadErik Johnston2015-04-301-11/+5
|
* Don't needlessly join on state_eventsErik Johnston2015-04-301-3/+2
|
* For backwards compat, make state_groups.id have a type of int, not varcharErik Johnston2015-04-131-1/+1
|
* PEP8Erik Johnston2015-04-071-1/+0
|
* Don't use AUTOINCREMENT, use an in memory versionErik Johnston2015-04-071-3/+3
|
* Remove uses of REPLACE and ON CONFLICT IGNORE to make the SQL more portable.Erik Johnston2015-03-231-1/+0
|
* Merge branch 'develop' of github.com:matrix-org/synapse into mysqlErik Johnston2015-03-201-0/+1
|\
| * Rearrange storage modulesErik Johnston2015-03-201-0/+32
| |
* | Rearrange storage modulesErik Johnston2015-03-201-0/+32
| |
* | Convert storage layer to be mysql compatibleErik Johnston2015-03-191-2/+8
|/
* Copy dict of context.current_state before changing it.Erik Johnston2015-03-161-1/+1
|
* Remove unused functionsMark Haines2015-01-131-6/+0
|
* Merge pull request #28 from matrix-org/erikj-perfMark Haines2015-01-061-8/+6
|\ | | | | Database performance improvements.
| * Remove debug linesErik Johnston2015-01-061-7/+0
| |
| * Add some debug loggingErik Johnston2015-01-061-0/+12
| |
| * Test some ideas that might help performance a bitErik Johnston2014-12-171-8/+1
| |
* | Update copyright noticesMark Haines2015-01-061-1/+1
|/
* Various typos and bug fixes.Erik Johnston2014-12-081-3/+3
|
* Start making more things use EventContext rather than event.*Erik Johnston2014-12-051-4/+9
|
* Correctly handle the case where we get an event for an unknown room, which ↵Erik Johnston2014-11-261-1/+1
| | | | turns out we are actually in
* Document StateStore and use transactionsErik Johnston2014-11-121-28/+56
|
* Fix bugs with invites/joins across federatiom.Erik Johnston2014-11-121-3/+6
| | | | | Both in terms of auth and not trying to fetch missing PDUs for invites, joins etc.
* Fix bug where we /always/ created a new state groupErik Johnston2014-11-111-7/+2
|
* Add transaction level logging and timing information. Add a _simple_delete ↵Erik Johnston2014-10-281-0/+1
| | | | method
* Use state groups to get current state. Make join dance actually work.Erik Johnston2014-10-171-0/+3
|
* Begin making auth use event.old_state_eventsErik Johnston2014-10-151-1/+1
|
* Add missing package storate.stateErik Johnston2014-10-151-0/+97