summary refs log tree commit diff
path: root/synapse/storage/events.py (follow)
Commit message (Expand)AuthorAgeFilesLines
* Rename async to async_helpers because `async` is a keyword on Python 3.7 (#3678)Amber Brown2018-08-101-1/+1
* Fix occasional glitches in the synapse_event_persisted_position metricRichard van der Hoff2018-08-071-3/+8
* Merge pull request #3621 from matrix-org/erikj/split_fed_storeErik Johnston2018-08-021-2/+12
|\
| * update docsErik Johnston2018-08-011-1/+1
| * Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_fed_...Erik Johnston2018-07-301-2/+0
| |\
| * | Split out DB writes in federation handlerErik Johnston2018-07-251-2/+12
* | | Python 3: Convert some unicode/bytes uses (#3569)Amber Brown2018-08-021-4/+10
* | | Merge pull request #3612 from matrix-org/rav/store_heirarchyRichard van der Hoff2018-07-311-1/+5
|\ \ \ | |_|/ |/| |
| * | reinstate explicit include of EventsWorkerStoreRichard van der Hoff2018-07-311-1/+3
| * | Make EventStore inherit from EventFederationStoreRichard van der Hoff2018-07-261-2/+4
| |/
* | Merge pull request #3614 from matrix-org/rav/stop_populating_event_contentRichard van der Hoff2018-07-261-1/+0
|\ \
| * | Stop populating events.contentRichard van der Hoff2018-07-261-1/+0
| |/
* / Remove some redundant joins on event_edges.room_idRichard van der Hoff2018-07-261-1/+0
|/
* Merge pull request #3603 from matrix-org/erikj/handle_outliersErik Johnston2018-07-251-6/+8
|\
| * Actually fix it by adding continueErik Johnston2018-07-251-0/+1
| * Fix typo in conditionalErik Johnston2018-07-251-1/+1
| * Correctly handle outliers during persist eventsErik Johnston2018-07-251-6/+7
* | Merge pull request #3606 from matrix-org/rav/logcontext_fixes_once_moreRichard van der Hoff2018-07-251-5/+4
|\ \
| * | Fix another logcontext leak in _persist_eventsRichard van der Hoff2018-07-251-5/+4
| |/
* / Fix occasional 'tuple index out of range' errorRichard van der Hoff2018-07-251-1/+1
|/
* Expand on docstring comment about return valueErik Johnston2018-07-241-0/+5
* Remove unnecessary iteritemsErik Johnston2018-07-241-1/+1
* Fixup comment (and indent)Erik Johnston2018-07-241-16/+20
* Don't fetch state from the database unless neededErik Johnston2018-07-241-12/+18
* Have _get_new_state_after_events return deltaErik Johnston2018-07-241-17/+48
* Don't require to_delete to have event_idsErik Johnston2018-07-241-36/+55
* Merge branch 'develop' of github.com:matrix-org/synapse into erikj/speed_up_c...Erik Johnston2018-07-241-12/+23
|\
| * Merge branch 'develop' into rav/logcontext_fixesRichard van der Hoff2018-07-241-11/+21
| |\
| | * fix idiocyRichard van der Hoff2018-07-241-2/+8
| | * Add some measure blocks to persist_eventsRichard van der Hoff2018-07-231-11/+15
| * | Logcontext fixesRichard van der Hoff2018-07-241-2/+3
| |/
* | Remove unnecessary ifErik Johnston2018-07-241-2/+1
* | Speed up _calculate_state_deltaErik Johnston2018-07-241-10/+3
|/
* CommentsErik Johnston2018-07-231-0/+3
* Only get cached state from context in persist_eventErik Johnston2018-07-231-1/+3
* Use new gettersErik Johnston2018-07-231-1/+1
* Run things as background processesRichard van der Hoff2018-07-181-6/+4
* run isortAmber Brown2018-07-091-19/+15
* Invalidate cache on correct threadErik Johnston2018-07-021-1/+2
* Attempt to be more performant on PyPy (#3462)Amber Brown2018-06-281-1/+2
* Deleting from event_push_actions needs to use an indexMark Haines2018-06-221-1/+8
* Consistently use six's iteritems and wrap lazy keys/values in list() if they'...Amber Brown2018-05-311-22/+25
* cleanupAmber Brown2018-05-221-3/+6
* Merge remote-tracking branch 'origin/develop' into 3218-official-promAmber Brown2018-05-221-24/+53
|\
| * Clarify commentErik Johnston2018-05-161-1/+2
| * CommentsErik Johnston2018-05-161-0/+8
| * Move and rename variableErik Johnston2018-05-161-3/+3
| * Make purge_history operate on tokensErik Johnston2018-05-151-8/+9
| * Use events_to_purge table rather than tokenErik Johnston2018-05-151-15/+34
* | rest of the changesAmber Brown2018-05-211-17/+11
|/
* Fix up grammarErik Johnston2018-05-031-3/+3
* Refactor event storage to not require stateErik Johnston2018-04-271-37/+67
* Refactor store.have_eventsRichard van der Hoff2018-04-201-7/+42
* Track where event stream processing have gotten up toErik Johnston2018-04-111-0/+3
* Use static JSONEncodersRichard van der Hoff2018-03-291-15/+8
* CommentErik Johnston2018-03-271-4/+5
* Fix indentErik Johnston2018-03-271-1/+1
* CommentErik Johnston2018-03-271-0/+7
* Add counter metrics for calculating state deltaErik Johnston2018-03-271-1/+30
* Merge branch 'master' of github.com:matrix-org/synapse into developErik Johnston2018-03-191-1/+0
|\
| * Remove wrong commentErik Johnston2018-03-161-1/+0
| * Replace ujson with simplejsonErik Johnston2018-03-151-2/+2
* | Replace some ujson with simplejson to make it workErik Johnston2018-03-161-1/+1
* | Add Measure block for persist_eventsRichard van der Hoff2018-03-131-4/+5
* | Fix race in sync when joining roomErik Johnston2018-03-071-1/+1
* | Add some caches to help read marker APIErik Johnston2018-03-011-2/+2
* | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/handle_unp...Erik Johnston2018-02-261-359/+7
|\ \
| * | Split EventsWorkerStore into separate fileErik Johnston2018-02-231-360/+5
| * | Update copyrightErik Johnston2018-02-231-0/+1
| * | Remove redundant clockErik Johnston2018-02-231-3/+0
| * | _event_persist_queue shouldn't be in worker storeErik Johnston2018-02-231-4/+4
| * | Split out get_events and co into a worker storeErik Johnston2018-02-211-345/+350
* | | Ensure all push actions are deleted from stagingErik Johnston2018-02-201-1/+10
* | | Refactor _set_push_actions_for_event_and_users_txn to use events_and_contextsErik Johnston2018-02-201-5/+6
|/ /
* | (Really) fix tablescan of event_push_actions on purgeRichard van der Hoff2018-02-161-1/+0
* | Remove context.push_actionsErik Johnston2018-02-151-4/+3
* | Update event_push_actions table from staging tableErik Johnston2018-02-151-1/+1
* | purge_history: fix sqlite syntax errorRichard van der Hoff2018-02-141-1/+4
* | purge_history: handle sqlite asshatteryRichard van der Hoff2018-02-141-19/+27
* | purge_history: fix index useRichard van der Hoff2018-02-141-0/+14
* | Rework event purge to use a temporary tableRichard van der Hoff2018-02-141-35/+58
* | Fix log message in purge_historyRichard van der Hoff2018-02-131-2/+1
* | Merge pull request #2864 from matrix-org/rav/persist_event_cachingRichard van der Hoff2018-02-131-56/+40
|\ \
| * | style nitRichard van der Hoff2018-02-131-1/+1
| * | Use StateResolutionHandler to resolve state in persist eventsRichard van der Hoff2018-02-051-48/+24
| * | Flatten _get_new_state_after_eventsRichard van der Hoff2018-02-051-44/+46
| * | Check that events being persisted have state_groupRichard van der Hoff2018-02-051-4/+9
| * | Add event_map param to resolve_state_groupsRichard van der Hoff2018-02-051-0/+1
* | | Merge pull request #2858 from matrix-org/rav/purge_updatesRichard van der Hoff2018-02-091-33/+61
|\ \ \
| * | | purge: move room_depth update to endRichard van der Hoff2018-02-091-6/+12
| * | | delete_local_events for purge_historyRichard van der Hoff2018-02-091-7/+28
| * | | purge: Move cache invalidation to more appropriate placeRichard van der Hoff2018-02-091-4/+4
| * | | bump purge logging to infoRichard van der Hoff2018-02-091-13/+14
| * | | rename delete_old_state -> purge_historyRichard van der Hoff2018-02-091-7/+7
* | | | Store state groups separately from events (#2784)Erik Johnston2018-02-061-6/+4
| |/ / |/| |
* | | Remove redundant return value from _calculate_state_deltaRichard van der Hoff2018-02-051-10/+23
* | | factor _get_new_state_after_events out of _calculate_state_deltaRichard van der Hoff2018-01-311-18/+39
* | | Improve exception handling in persist_eventRichard van der Hoff2018-01-291-3/+3
|/ /
* | Merge pull request #2805 from matrix-org/rav/log_state_resRichard van der Hoff2018-01-171-0/+6
|\ \
| * | Log room when doing state resolutionRichard van der Hoff2018-01-171-0/+6
| |/
* | Split resolve_events into two functionsRichard van der Hoff2018-01-171-2/+2
* | Fix a logcontext leak in persist_eventsRichard van der Hoff2018-01-161-1/+8
|/
* Make __init__ consitstent across Store heirarchyRichard van der Hoff2017-11-131-2/+2
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-231-1/+1
* Fix logcontext handling for persist_eventsRichard van der Hoff2017-10-171-7/+17
* Invalidate cacheErik Johnston2017-10-031-0/+3
* Make into listErik Johnston2017-06-291-1/+1
* Prefill forward extrems and event to state groupsErik Johnston2017-06-291-0/+5
* Merge pull request #2286 from matrix-org/erikj/split_out_user_dirErik Johnston2017-06-161-0/+18
|\
| * Initial worker implErik Johnston2017-06-161-0/+18
* | Merge pull request #2281 from matrix-org/erikj/phone_home_statsErik Johnston2017-06-151-58/+43
|\ \ | |/ |/|
| * Add some more statsErik Johnston2017-06-151-0/+15
| * Fix phone home statsErik Johnston2017-06-141-59/+29
* | Add cache for is_host_joinedErik Johnston2017-06-131-0/+5
* | Merge pull request #2259 from matrix-org/erikj/fix_state_woesErik Johnston2017-06-071-1/+1
|\ \
| * | Fix bug where state_group tables got corruptedErik Johnston2017-06-071-1/+1
| |/
* | Fix typoErik Johnston2017-05-311-1/+1
* | Add stream change cacheErik Johnston2017-05-311-0/+4
* | Add clobbered event_idErik Johnston2017-05-301-0/+1
* | Add current_state_delta_stream tableErik Johnston2017-05-301-8/+23
* | Only store event_auth for state eventsErik Johnston2017-05-241-0/+1
|/
* Merge pull request #2224 from matrix-org/erikj/prefill_stateErik Johnston2017-05-161-5/+10
|\
| * Remove spurious merge artifactsErik Johnston2017-05-161-13/+0
| * CommentsErik Johnston2017-05-151-3/+3
| * Add more granular event send metricsErik Johnston2017-05-151-0/+12
| * Prefill state cachesErik Johnston2017-05-151-2/+8
* | Don't create event_search index on sqliteRichard van der Hoff2017-05-111-0/+1
* | Add more logging for purgingRichard van der Hoff2017-05-111-7/+14
* | Add an index to event_searchRichard van der Hoff2017-05-111-0/+11
|/
* Tidy purge code and add some commentsRichard van der Hoff2017-05-111-12/+19
* Don't de-delta state groups we're about to deleteRichard van der Hoff2017-05-101-11/+9
* add some logging to purge_historyRichard van der Hoff2017-05-101-4/+21
* Expand docstring a bitErik Johnston2017-05-081-1/+7
* Don't update event cache hit ratio from get_joined_usersErik Johnston2017-05-081-2/+11
* Revert "Prefill state caches"Erik Johnston2017-05-041-11/+5
* CommentsErik Johnston2017-05-031-3/+3
* Merge branch 'develop' of github.com:matrix-org/synapse into erikj/prefill_stateErik Johnston2017-05-031-0/+18
|\
| * Add more granular event send metricsErik Johnston2017-05-021-0/+16
* | Prefill state cachesErik Johnston2017-05-021-2/+6
|/
* Correct logic in is_event_afterLuke Barnard2017-04-131-1/+1
* Simplify is_event_after logicLuke Barnard2017-04-121-10/+3
* travis flake8..Luke Barnard2017-04-111-0/+1
* Refactor event ordering check to events storeLuke Barnard2017-04-111-0/+28
* Add new storage functions for new replicationErik Johnston2017-03-301-0/+88
* TypoErik Johnston2017-03-271-1/+1
* Short circuit if all new events have same state groupErik Johnston2017-03-271-36/+51
* Use iter(items|values)Erik Johnston2017-03-241-18/+14
* User Cursor.__iter__ instead of fetchallErik Johnston2017-03-231-1/+1
* Merge pull request #2033 from matrix-org/erikj/repl_speedErik Johnston2017-03-211-17/+14
|\
| * Don't send the full event json over replicationErik Johnston2017-03-171-17/+14
* | Avoid resetting state on rejected eventsRichard van der Hoff2017-03-171-4/+4
* | Refactoring and cleanupsRichard van der Hoff2017-03-171-60/+213
|/
* Merge branch 'develop' of github.com:matrix-org/synapse into erikj/public_lis...Erik Johnston2017-03-141-3/+28
|\
| * Fix current_state_events table to not lieErik Johnston2017-03-141-3/+28
* | Get current state by using current_state_events tableErik Johnston2017-03-101-10/+8
|/
* Remove needless checkErik Johnston2017-02-271-2/+0
* It should be allErik Johnston2017-02-271-1/+1
* Don't fetch current state in common caseErik Johnston2017-02-271-0/+17
* Ignore new rejected events when working out forward extremeties.Erik Johnston2017-02-081-9/+6
* Merge pull request #1870 from matrix-org/erikj/cache_get_all_new_eventsErik Johnston2017-02-011-0/+2
|\
| * Add a small cache get_all_new_eventsErik Johnston2017-02-011-0/+2
* | Only invalidate membership caches based on the cache streamErik Johnston2017-01-311-20/+0
|/
* Stream cache invalidations for room membership storage functionsErik Johnston2017-01-301-2/+6
* TypoErik Johnston2017-01-231-1/+1
* Refactor to calculate state delta outside transactionErik Johnston2017-01-231-87/+118
* CommentsErik Johnston2017-01-201-8/+19
* Insert delta of current_state_events to be more efficientErik Johnston2017-01-201-26/+52
* SpellingErik Johnston2017-01-201-1/+1
* Update all call sites after renameErik Johnston2017-01-201-1/+1
* CommentsErik Johnston2017-01-201-0/+11
* Calculate the forward extremeties onceErik Johnston2017-01-201-56/+86
* Derive current_state_events from state groupsErik Johnston2017-01-201-70/+118
* Lower loading events log to DEBUGErik Johnston2017-01-171-2/+2
* More logging for the linearizer and for get_eventsMark Haines2017-01-051-0/+2
* New Flake8 fixesErik Johnston2016-11-151-0/+1
* Merge branch 'develop' of github.com:matrix-org/synapse into erikj/remove_authErik Johnston2016-10-171-15/+29
|\
| * Fix background reindex of origin_server_tsErik Johnston2016-09-271-15/+29
* | Drop some unused indicesErik Johnston2016-10-171-1/+0
|/
* Index contains_url for file search queriesErik Johnston2016-09-121-0/+8
* Take value in a better wayErik Johnston2016-09-051-1/+1
* Correctly delete old state groups in purge history APIErik Johnston2016-09-051-20/+79
* Limit the length of state chainsErik Johnston2016-09-021-21/+28
* Generate state group ids in state layerErik Johnston2016-08-311-9/+1
* Make _state_groups_id_gen a normal IdGeneratorErik Johnston2016-08-301-44/+39
* Use state handler instead of get_users_in_room/get_joined_hostsErik Johnston2016-08-261-1/+0
* Preserve some logcontextsErik Johnston2016-08-241-6/+10
* Move defer.returnValue out of MeasureErik Johnston2016-08-191-1/+1
* Measure _get_event_from_rowErik Johnston2016-08-191-41/+43
* Add missing database corruption recovery caseBenjamin Saunders2016-08-141-1/+2
* Raise 404 when couldn't find eventErik Johnston2016-08-051-1/+1
* Delete more tablesErik Johnston2016-08-051-0/+5
* Tweak integrity error recovery to work as intendedBenjamin Saunders2016-08-041-0/+3
* Fix typoErik Johnston2016-08-041-3/+4
* Retry event persistence on IntegrityErrorErik Johnston2016-08-041-4/+65
* Remove other bit of deduplicationErik Johnston2016-08-031-19/+0
* Ensure we only persist an event once at a timeErik Johnston2016-08-031-1/+18
* Fix how push_actions are redacted.Mark Haines2016-07-261-8/+10
* Don't add rejected events if we've seen them befrore. Add some comments to ex...Mark Haines2016-07-261-5/+48
* Only update the events and event_json tables for rejected eventsMark Haines2016-07-251-51/+62
* Don't add the events to forward extremities if the event is rejectedMark Haines2016-07-251-3/+6
* Don't add rejections to the state_group, persist all rejectionsMark Haines2016-07-251-4/+5
* Merge pull request #922 from matrix-org/erikj/file_api2Erik Johnston2016-07-201-0/+82
|\
| * Add sender and contains_url field to events tableErik Johnston2016-07-141-0/+82
* | Fix /purge_history bugErik Johnston2016-07-151-19/+15
* | event_backwards_extremeties may not be emptyErik Johnston2016-07-151-1/+11
|/
* CommentErik Johnston2016-07-071-0/+3
* Return 400 rather than 500Erik Johnston2016-07-071-1/+4
* Add rest servlet. Fix SQL.Erik Johnston2016-07-061-5/+4
* Add purge_history APIErik Johnston2016-07-051-0/+6
* Add storage function to purge history for a roomErik Johnston2016-07-041-0/+140
* Use similar naming we use in email notifs for pushDavid Baker2016-06-241-7/+0
* Merge pull request #841 from matrix-org/erikj/event_counterErik Johnston2016-06-061-0/+9
|\
| * Add metric counter for number of persisted eventsErik Johnston2016-06-061-0/+9
* | Add events to cache when we persist themErik Johnston2016-06-061-0/+41
|/
* Don't rely on options when inserting event into cacheErik Johnston2016-06-031-40/+43
* Change the way we cache eventsErik Johnston2016-06-031-39/+41
* Remove event fetching from DB threadsErik Johnston2016-06-031-138/+0
* Use state to calculate get_users_in_roomErik Johnston2016-06-011-3/+0
* Merge remote-tracking branch 'origin/develop' into dbkr/email_notifsDavid Baker2016-05-101-11/+149
|\
| * Remove unused importErik Johnston2016-05-061-1/+1
| * Pull loop one level upErik Johnston2016-05-061-36/+41
| * Queue events for persistenceErik Johnston2016-05-061-11/+144
* | Merge remote-tracking branch 'origin/develop' into dbkr/email_notifsDavid Baker2016-04-291-2/+8
|\|
| * Check that somethign has happend before running the selectsMark Haines2016-04-271-2/+8
* | First bits of emailpusherDavid Baker2016-04-191-0/+2
|/
* Add back backfilled parameter that was removedErik Johnston2016-04-121-3/+4
* Check if we've already backfilled eventsErik Johnston2016-04-121-0/+16
* Merge remote-tracking branch 'origin/develop' into dbkr/pushers_use_event_act...David Baker2016-04-071-2/+2
|\
| * Add a slaved events store classMark Haines2016-04-061-2/+2
* | pep8David Baker2016-04-061-1/+3
* | Make pushers use the event_push_actions table instead of listening on an even...David Baker2016-04-061-0/+12
|/
* Store invites in a separate table.Erik Johnston2016-04-041-9/+4
* Merge pull request #684 from matrix-org/markjh/backfill_id_genMark Haines2016-04-011-14/+5
|\
| * Use a stream id generator for backfilled idsMark Haines2016-04-011-14/+5
* | Fix the invalidation of the names and aliases cacheMark Haines2016-04-011-1/+1
|/
* Move the check for backfilled outside the for loopMark Haines2016-03-311-5/+5
* Remove the is_new_state argument to persist event.Mark Haines2016-03-311-40/+50
* Merge pull request #676 from matrix-org/markjh/replicate_stateIIIMark Haines2016-03-311-2/+76
|\
| * Use a namedtuple rather than tuple unpackingMark Haines2016-03-311-2/+9
| * Add replication streams for ex outliers and current state resetsMark Haines2016-03-301-1/+59
| * Add a entry to current_state_resets table when the current state is resetMark Haines2016-03-301-0/+9
* | return the state_group for backfillMark Haines2016-03-301-1/+2
|/
* Add a replication stream for state groupsMark Haines2016-03-301-1/+5
* Use a stream id generator to assign state group idsMark Haines2016-03-301-40/+50
* Merge pull request #665 from matrix-org/erikj/dont_cache_eventsErik Johnston2016-03-231-2/+2
|\
| * Don't cache events in get_current_state_for_keyErik Johnston2016-03-231-2/+2
* | Make StateHandler._state_cache only store event_ids.Erik Johnston2016-03-221-0/+25
|/
* Remove unused backfilled parameter from persist_eventMark Haines2016-03-211-18/+4
* Dedupe requested event list in _get_eventsErik Johnston2016-03-181-14/+12
* Fix relative imports so they work in both py3 and py27Mark Haines2016-03-081-1/+1