summary refs log tree commit diff
path: root/synapse/storage (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused string formatting paramErik Johnston2018-05-221-1/+0
|
* Don't support limitless paginationErik Johnston2018-05-221-8/+6
| | | | | | | The pagination storage function supported not specifiying a limit on the number of events returned. This was triggered when using the search or context API with a limit of zero, which the storage function took to mean not being limited.
* Send users a server notice about consentRichard van der Hoff2018-05-222-7/+59
| | | | | When a user first syncs, we will send them a server notice asking them to consent to the privacy policy if they have not already done so.
* Tighter filtering for user_daily_visitsNeil Johnson2018-05-181-1/+5
|
* fix psql compatability bugNeil Johnson2018-05-181-1/+1
|
* Merge pull request #3235 from matrix-org/rav/fix_receipts_deferredRichard van der Hoff2018-05-181-7/+11
|\ | | | | Fix error in handling receipts
| * Fix error in handling receiptsRichard van der Hoff2018-05-181-7/+11
| | | | | | | | | | | | | | | | Fixes an error which has been happening ever since #2158 (v0.21.0-rc1): > TypeError: argument of type 'ObservableDeferred' is not iterable fixes #3234
* | Merge pull request #3221 from matrix-org/erikj/purge_tokenErik Johnston2018-05-181-24/+53
|\ \ | |/ |/| Make purge_history operate on tokens
| * 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
| | | | | | | | As we're soon going to change how topological_ordering works
| * Use events_to_purge table rather than tokenErik Johnston2018-05-151-15/+34
| |
* | Merge pull request #3212 from matrix-org/erikj/epa_streamErik Johnston2018-05-172-38/+16
|\ \ | | | | | | Use stream rather depth ordering for push actions
| * | Use stream rather depth ordering for push actionsErik Johnston2018-05-112-38/+16
| | | | | | | | | | | | | | | | | | This simplifies things as it is, but will also allow us to change the way we traverse topologically without having to update the way push actions work.
* | | Merge pull request #3163 from matrix-org/cohort_analyticsNeil Johnson2018-05-165-5/+113
|\ \ \ | | | | | | | | user visit data
| * | | remove empty lineNeil Johnson2018-05-161-1/+0
| | | |
| * | | style and further contraining queryNeil Johnson2018-05-161-8/+12
| | | |
| * | | Limit query load of generate_user_daily_visitsNeil Johnson2018-05-151-13/+47
| | | | | | | | | | | | | | | | The aim is to keep track of when it was last called and only query from that point in time
| * | | instead of inserting user daily visit data at the end of the day, instead ↵Neil Johnson2018-05-141-40/+14
| | | | | | | | | | | | | | | | insert incrementally through the day
| * | | Merge branch 'develop' of https://github.com/matrix-org/synapse into ↵Neil Johnson2018-05-1410-290/+380
| |\| | | | | | | | | | | | | | cohort_analytics
| * | | remove user agent from data model, will just join on user_ipsNeil Johnson2018-05-011-12/+11
| | | |
| * | | add inidexes based on usageNeil Johnson2018-05-011-6/+2
| | | |
| * | | pep8Neil Johnson2018-04-251-3/+4
| | | |
| * | | Generate user daily statsNeil Johnson2018-04-255-5/+106
| | | |
* | | | Merge pull request #3213 from matrix-org/rav/consent_handlerRichard van der Hoff2018-05-162-0/+36
|\ \ \ \ | |_|_|/ |/| | | ConsentResource to gather policy consent from users
| * | | ConsentResource to gather policy consent from usersRichard van der Hoff2018-05-152-0/+36
| | |/ | |/| | | | | | | | | | Hopefully there are enough comments and docs in this that it makes sense on its own.
* | | Merge pull request #3201 from matrix-org/dbkr/leave_rooms_on_deactivateDavid Baker2018-05-142-0/+64
|\ \ \ | |/ / |/| | Part user from rooms on account deactivate
| * | Many docstringsDavid Baker2018-05-101-0/+12
| | |
| * | Add the schema fileDavid Baker2018-05-091-0/+25
| | |
| * | Part deactivated users in the backgroundDavid Baker2018-05-091-0/+27
| | | | | | | | | | | | | | | One room at a time so we don't take out the whole server with leave events, and restart at server restart.
* | | Merge pull request #3199 from matrix-org/erikj/pagination_syncErik Johnston2018-05-091-39/+36
|\ \ \ | | | | | | | | Refactor sync APIs to reuse pagination API
| * | | Refactor sync APIs to reuse pagination APIErik Johnston2018-05-091-38/+35
| | | | | | | | | | | | | | | | | | | | | | | | The sync API often returns events in a topological rather than stream ordering, e.g. when the user joined the room or on initial sync. When this happens we can reuse existing pagination storage functions.
| * | | Don't unnecessarily require token to be stream tokenErik Johnston2018-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | This allows calling the `get_recent_event_ids_for_room` function in more situations.
* | | | Merge pull request #3198 from matrix-org/erikj/fixup_return_paginationErik Johnston2018-05-091-1/+15
|\ \ \ \ | | | | | | | | | | Refactor get_recent_events_for_room return type
| * | | | Fix up commentErik Johnston2018-05-091-1/+1
| | | | |
| * | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-05-091-5/+6
| |\ \ \ \ | | |/ / / | |/| | | | | | | | erikj/fixup_return_pagination
| * | | | Refactor get_recent_events_for_room return typeErik Johnston2018-05-091-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no reason to return a tuple of tokens when the last token is always the token passed as an argument. Changing it makes it consistent with other storage APIs
* | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-05-091-5/+6
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | erikj/remove_membership_change
| * | | | Update commentsErik Johnston2018-05-091-5/+6
| |/ / /
* / / / Remove unused code path from member change DB funcErik Johnston2018-05-091-24/+10
|/ / / | | | | | | | | | | | | The function is never called without a from_key, so we can remove all the handling for that scenario.
* | | Refactor pagination DB API to return concrete typeErik Johnston2018-05-091-28/+48
| | | | | | | | | | | | | | | This makes it easier to document what is being returned by the storage functions and what some functions expect as arguments.
* | | Remove unused from_token paramErik Johnston2018-05-091-7/+4
| | |
* | | Refactor recent events func to use pagination funcErik Johnston2018-05-091-48/+27
| | | | | | | | | | | | This also removes a cache that is unlikely to ever get hit.
* | | Fix up comments and make function privateErik Johnston2018-05-091-7/+7
| | |
* | | Reuse existing pagination code for context APIErik Johnston2018-05-081-75/+15
| | |
* | | Parse tokens before calling DB functionErik Johnston2018-05-081-14/+18
| | |
* | | Only fetch required fields from databaseErik Johnston2018-05-081-1/+2
| | |
* | | Split paginate_room_events storage functionErik Johnston2018-05-081-28/+72
|/ /
* | Merge pull request #3141 from matrix-org/erikj/fixup_stateErik Johnston2018-05-031-37/+67
|\ \ | | | | | | Refactor event storage to prepare for changes in state calculations
| * | Fix up grammarErik Johnston2018-05-031-3/+3
| | |
| * | Refactor event storage to not require stateErik Johnston2018-04-271-37/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation for using contexts that may or may not have the current_state_ids set. This will allow us to avoid unnecessarily pulling out state for an event on the master process when using workers. We also add a check to see if the state groups of the old extremities are the same as the new ones.
* | | Merge pull request #3129 from matrix-org/matthew/fix_group_dupsMatthew Hodgson2018-04-301-0/+57
|\ \ \ | | | | | | | | remove duplicates from groups tables
| * | | fix missing importMatthew Hodgson2018-04-281-0/+1
| | | |
| * | | pep8Matthew Hodgson2018-04-281-3/+5
| | | |
| * | | make it work with sqliteMatthew Hodgson2018-04-282-34/+54
| | | |
| * | | remove duplicates from groups tablesMatthew Hodgson2018-04-251-0/+34
| | |/ | |/| | | | | | | | | | and rename inconsistently named indexes. Based on https://github.com/matrix-org/synapse/pull/3128 - thanks @vurpo\!
* | | Merge branch 'develop' into py3-xrange-1Richard van der Hoff2018-04-302-4/+6
|\ \ \
| * \ \ Merge remote-tracking branch 'origin/develop' into rav/use_run_in_backgroundRichard van der Hoff2018-04-272-8/+18
| |\ \ \
| * | | | Use run_in_background in preference to preserve_fnRichard van der Hoff2018-04-272-4/+6
| | |_|/ | |/| | | | | | | | | | | | | | | | | | While I was going through uses of preserve_fn for other PRs, I converted places which only use the wrapped function once to use run_in_background, to avoid creating the function object.
* | | | Move more xrange to sixAdrian Tschira2018-04-284-4/+12
| |/ / |/| | | | | | | | | | | | | | plus a bonus next() Signed-off-by: Adrian Tschira <nota@notafile.com>
* | | Merge pull request #3138 from matrix-org/rav/catch_unhandled_exceptionsRichard van der Hoff2018-04-271-7/+17
|\ \ \ | | | | | | | | Improve exception handling for background processes
| * | | Improve exception handling for background processesRichard van der Hoff2018-04-271-7/+17
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a bunch of places where we fire off a process to happen in the background, but don't have any exception handling on it - instead relying on the unhandled error being logged when the relevent deferred gets garbage-collected. This is unsatisfactory for a number of reasons: - logging on garbage collection is best-effort and may happen some time after the error, if at all - it can be hard to figure out where the error actually happened. - it is logged as a scary CRITICAL error which (a) I always forget to grep for and (b) it's not really CRITICAL if a background process we don't care about fails. So this is an attempt to add exception handling to everything we fire off into the background.
* / / Add missing consumeErrorsRichard van der Hoff2018-04-271-1/+1
|/ / | | | | | | | | In general we want defer.gatherResults to consumeErrors, rather than having exceptions hanging around and getting logged as CRITICAL unhandled errors.
* | Fix media admin APIsErik Johnston2018-04-261-2/+2
| |
* | Also fix reindexing of searchErik Johnston2018-04-251-1/+1
| |
* | Fix quarantine media admin APIErik Johnston2018-04-251-1/+1
|/
* Merge pull request #3110 from NotAFile/py3-six-queueRichard van der Hoff2018-04-201-2/+4
|\ | | | | Replace Queue with six.moves.queue
| * Replace Queue with six.moves.queueAdrian Tschira2018-04-161-2/+4
| | | | | | | | | | | | and a six.range change which I missed the last time Signed-off-by: Adrian Tschira <nota@notafile.com>
* | Merge pull request #3117 from matrix-org/rav/refactor_have_eventsRichard van der Hoff2018-04-201-7/+42
|\ \ | | | | | | Refactor store.have_events
| * | Refactor store.have_eventsRichard van der Hoff2018-04-201-7/+42
| |/ | | | | | | | | | | It turns out that most of the time we were calling have_events, we were only using half of the result. Replace have_events with have_seen_events and get_rejection_reasons, so that we can see what's going on a bit more clearly.
* / Avoid creating events with huge numbers of prev_eventsRichard van der Hoff2018-04-161-16/+41
|/ | | | | | In most cases, we limit the number of prev_events for a given event to 10 events. This fixes a particular code path which created events with huge numbers of prev_events.
* Format docstringErik Johnston2018-04-121-2/+3
|
* Doc we raise on unknown eventErik Johnston2018-04-121-2/+3
|
* Track last processed event received_tsErik Johnston2018-04-111-0/+18
|
* Track where event stream processing have gotten up toErik Johnston2018-04-111-0/+3
|
* Merge pull request #2760 from Valodim/pypyRichard van der Hoff2018-04-112-1/+6
|\ | | | | Synapse on PyPy
| * Fix pep8 error on psycopg2cffi hackRichard van der Hoff2018-04-101-6/+5
| |
| * Use psycopg2cffi module instead of psycopg2 if running on pypyVincent Breitmoser2018-04-102-2/+8
| | | | | | | | | | | | | | The psycopg2 package isn't available for PyPy. This commit adds a check if the runtime is PyPy, and if it is uses psycopg2cffi module in favor of psycopg2. This is almost a drop-in replacement, except for one place where an additional cast to string is required.
* | fix typoNeil Johnson2018-04-101-2/+2
| |
* | remove errant print v0.27.3-rc2Neil Johnson2018-04-091-1/+1
| |
* | Fix msec to sec, againNeil Johnson2018-04-091-3/+3
| |
* | Fix msec to secNeil Johnson2018-04-091-1/+1
| |
* | Fix psycopg2 interpolationNeil Johnson2018-04-091-5/+5
|/
* Don't use redundant inlineCallbacksLuke Barnard2018-04-061-4/+1
|
* join_rule -> join_policyLuke Barnard2018-04-061-1/+1
|
* is_joinable -> join_ruleLuke Barnard2018-04-061-4/+1
|
* pep8David Baker2018-04-061-1/+2
|
* Implement group join APIDavid Baker2018-04-061-3/+9
|
* Merge pull request #3045 from matrix-org/dbkr/group_joinableLuke Barnard2018-04-053-0/+42
|\ | | | | Add joinability for groups
| * NON NULL -> NOT NULLLuke Barnard2018-04-051-1/+1
| |
| * Use DEFAULT join_policy of "invite" in dbLuke Barnard2018-04-051-1/+1
| |
| * Document set_group_join_policyLuke Barnard2018-04-051-0/+6
| |
| * Use join_policy API instead of joinableLuke Barnard2018-04-032-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API is now under /groups/$group_id/setting/m.join_policy and expects a JSON blob of the shape ```json { "m.join_policy": { "type": "invite" } } ``` where "invite" could alternatively be "open".
| * OK, smallint it is thenDavid Baker2018-03-281-1/+1
| |
| * Grr. Copy the definition from is_adminDavid Baker2018-03-281-1/+1
| |
| * Make column definition that works on both dbsDavid Baker2018-03-281-1/+1
| |
| * Add schema delta fileDavid Baker2018-03-281-0/+16
| |
| * Add joinability for groupsDavid Baker2018-03-282-1/+15
| | | | | | | | | | Adds API to set the 'joinable' flag, and corresponding flag in the table.
* | Merge pull request #3041 from matrix-org/r30_statsNeil Johnson2018-04-054-7/+111
|\ \ | | | | | | R30 stats
| * | Review commentsNeil Johnson2018-04-051-4/+5
| | | | | | | | | | | | | | | Use iteritems over item to loop over dict formatting
| * | pep8Neil Johnson2018-03-291-2/+4
| | |
| * | Remove need for sqlite specific queryNeil Johnson2018-03-291-30/+57
| | |
| * | fix pep8 errorsNeil Johnson2018-03-281-3/+0
| | |
| * | remove twisted deferral cruftNeil Johnson2018-03-281-6/+3
| | |
| * | bump schema versionNeil Johnson2018-03-281-1/+1
| | |
| * | Support multi client R30 for psqlNeil Johnson2018-03-281-8/+28
| | |
| * | Add user_ips last seen indexNeil Johnson2018-03-282-0/+24
| | |
| * | No need to cast in count_daily_usersNeil Johnson2018-03-281-2/+2
| | |
| * | query and call for r30 statsNeil Johnson2018-03-281-0/+36
| | |
| * | count_daily_users failed if db was sqlite due to type failure - presumably ↵Neil Johnson2018-03-281-1/+1
| |/ | | | | | | this prevcented all sqlite homeservers reporting home
* | Merge pull request #3060 from matrix-org/rav/kill_event_contentRichard van der Hoff2018-04-053-7/+12
|\ \ | | | | | | Remove uses of events.content
| * | Remove uses of events.contentRichard van der Hoff2018-03-293-7/+12
| | |
* | | Merge pull request #3049 from matrix-org/rav/use_staticjsonRichard van der Hoff2018-04-031-15/+8
|\ \ \ | | | | | | | | Use static JSONEncoders
| * | | Use static JSONEncodersRichard van der Hoff2018-03-291-15/+8
| |/ / | | | | | | | | | | | | using json.dumps with custom options requires us to create a new JSONEncoder on each call. It's more efficient to create one upfront and reuse it.
* / / Use simplejson throughoutRichard van der Hoff2018-03-291-1/+2
|/ / | | | | | | Let's use simplejson rather than json, for consistency.
* | Fix search_user_dir multiple sqlite versions do different thingsNeil Johnson2018-03-281-2/+2
| |
* | Merge pull request #3029 from matrix-org/erikj/linearize_generate_user_idErik Johnston2018-03-281-3/+1
|\ \ | | | | | | Linearize calls to _generate_user_id
| * | Don't use _cursor_to_dict in find_next_generated_user_id_localpartErik Johnston2018-03-261-3/+1
| |/
* | Merge pull request #3030 from matrix-org/erikj/no_ujsonErik Johnston2018-03-281-1/+1
|\ \ | | | | | | Remove last usage of ujson
| * | Remove last usage of ujsonErik Johnston2018-03-261-1/+1
| |/
* | 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
|/ | | | | | This will allow us to measure how often we calculate state deltas in event persistence that we would have been able to calculate at the same time we calculated the state for the event.
* Merge branch 'master' of github.com:matrix-org/synapse into developErik Johnston2018-03-1917-26/+25
|\
| * Remove wrong commentErik Johnston2018-03-161-1/+0
| |
| * Replace ujson with simplejsonErik Johnston2018-03-1517-26/+26
| |
* | Replace some ujson with simplejson to make it workErik Johnston2018-03-162-2/+2
| |
* | Merge pull request #2988 from matrix-org/erikj/split_profile_storeErik Johnston2018-03-141-24/+26
|\ \ | | | | | | Split up ProfileStore
| * | Split up ProfileStoreErik Johnston2018-03-131-24/+26
| | |
* | | Merge pull request #2993 from matrix-org/erikj/is_blockedErik Johnston2018-03-141-13/+17
|\ \ \ | | | | | | | | Add is_blocked to worker store
| * | | Add is_blocked to worker storeErik Johnston2018-03-131-13/+17
| |/ /
* / / fix bug #2926 (loading all state for a given type from the DB if the ↵Matthew Hodgson2018-03-131-7/+27
|/ / | | | | | | | | state_key is None) (#2990) Fixes a regression that had crept in where the caching layer upholds requests for loading state which is filtered by type (but not by state_key), but the DB layer itself would interpret a missing state_key as a request to filter by null state_key rather than returning all state_keys.
* | Add Measure block for persist_eventsRichard van der Hoff2018-03-131-4/+5
| | | | | | | | This seems like a useful thing to measure.
* | Fix race in sync when joining roomErik Johnston2018-03-072-2/+27
| | | | | | | | | | | | | | | | | | | | | | The race happens when the user joins a room at the same time as doing a sync. We fetch the current token and then get the rooms the user is in. If the join happens after the current token, but before we get the rooms we end up sending down a partial room entry in the sync. This is fixed by looking at the stream ordering of the membership returned by get_rooms_for_user, and handling the case when that stream ordering is after the current token.
* | Merge pull request #2946 from matrix-org/rav/timestamp_to_purgeRichard van der Hoff2018-03-061-0/+27
|\ \ | | | | | | Implement purge_history by timestamp
| * | Provide a means to pass a timestamp to purge_historyRichard van der Hoff2018-03-051-0/+27
| | |
* | | Merge pull request #2948 from matrix-org/erikj/kill_as_syncErik Johnston2018-03-062-153/+5
|\ \ \ | | | | | | | | Remove ability for AS users to call /events and /sync
| * | | Remove ability for AS users to call /events and /syncErik Johnston2018-03-052-153/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This functionality has been deprecated for a while as well as being broken for a while. Instead of fixing it lets just remove it entirely. See: https://github.com/matrix-org/matrix-doc/issues/1144
* | | | Merge pull request #2947 from matrix-org/erikj/split_directory_storeErik Johnston2018-03-051-23/+27
|\ \ \ \ | |_|/ / |/| | | Split Directory store
| * | | Fix cache invalidation on deletionErik Johnston2018-03-051-1/+4
| | | |
| * | | Split Directory storeErik Johnston2018-03-051-22/+23
| |/ /
* | | Merge pull request #2943 from ↵Richard van der Hoff2018-03-051-12/+71
|\ \ \ | |/ / |/| | | | | | | | matrix-org/rav/fix_find_first_stream_ordering_after_ts Test and fix find_first_stream_ordering_after_ts
| * | Test and fix find_first_stream_ordering_after_tsRichard van der Hoff2018-03-051-15/+53
| | | | | | | | | | | | It seemed to suffer from a bunch of off-by-one errors.
| * | Add find_first_stream_ordering_after_tsRichard van der Hoff2018-03-051-0/+21
| | | | | | | | | | | | Expose this as a public function which can be called outside a txn
* | | Merge pull request #2934 from matrix-org/erikj/cache_fixErik Johnston2018-03-052-13/+15
|\ \ \ | | | | | | | | Fix bug with delayed cache invalidation stream
| * | | Fix bug with delayed cache invalidation streamErik Johnston2018-03-022-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | We poked the notifier before updated the current token for the cache invalidation stream. This mean that sometimes the update wouldn't be sent until the next time a cache was invalidated.
* | | | Split registration storeErik Johnston2018-03-021-57/+61
|/ / /
* | | Merge pull request #2925 from matrix-org/erikj/split_sig_fedErik Johnston2018-03-012-133/+143
|\ \ \ | |/ / |/| | Split out SignatureStore and EventFederationStore
| * | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_sig_fedErik Johnston2018-03-014-371/+406
| |\ \
| * | | Stub out broken function only used for cacheErik Johnston2018-03-011-1/+3
| | | |
| * | | Split out SignatureStore and EventFederationStoreErik Johnston2018-03-012-132/+140
| | | |
* | | | Merge pull request #2927 from matrix-org/erikj/read_marker_cachesErik Johnston2018-03-012-2/+39
|\ \ \ \ | |_|/ / |/| | | Improve caching for read_marker API
| * | | Fewer lies are betterErik Johnston2018-03-011-2/+2
| | | |
| * | | Improve caching for read_marker APIErik Johnston2018-03-011-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | We add a new storage function to get a paritcular type of room account data. This allows us to prefill the cache when updating that acount data.
| * | | Add some caches to help read marker APIErik Johnston2018-03-012-2/+4
| |/ /
* | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-03-013-197/+206
|\ \ \ | | | | | | | | | | | | erikj/split_stream_store
| * \ \ Merge pull request #2923 from matrix-org/erikj/stream_ago_workerErik Johnston2018-03-012-79/+85
| |\ \ \ | | | | | | | | | | Calculate stream_ordering_month_ago correctly on workers
| | * | | Default stream_ordering_*_ago to NoneErik Johnston2018-03-011-2/+2
| | | | |
| | * | | Fix comment typoErik Johnston2018-03-011-1/+1
| | | | |
| | * | | Calculate stream_ordering_month_ago correctly on workersErik Johnston2018-03-012-79/+85
| | |/ /
| * / / Split up RoomStoreErik Johnston2018-03-011-118/+121
| |/ /
* | | Remove unused variablesErik Johnston2018-03-011-8/+1
| | |
* | | Document abstract class and method betterErik Johnston2018-03-011-8/+13
| | |
* | | Split out stream storeErik Johnston2018-03-012-165/+193
|/ /
* | Move storage functions for push calculationsErik Johnston2018-02-274-87/+99
| | | | | | | | This will allow push actions for an event to be calculated on workers.
* | Merge pull request #2904 from matrix-org/erikj/receipt_cache_invalidationErik Johnston2018-02-271-14/+14
|\ \ | | | | | | Fix missing invalidations for receipt storage
| * | Fix missing invalidations for receipt storageErik Johnston2018-02-211-14/+14
| | |
* | | Merge pull request #2903 from matrix-org/erikj/split_roommember_storeErik Johnston2018-02-271-179/+182
|\ \ \ | | | | | | | | Split out RoomMemberStore
| * \ \ Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-02-238-501/+607
| |\ \ \ | | | | | | | | | | | | | | | erikj/split_roommember_store
| * | | | Update copyrightErik Johnston2018-02-232-0/+2
| | | | |
| * | | | Split out RoomMemberStoreErik Johnston2018-02-211-179/+181
| | | | |
* | | | | Merge pull request #2901 from matrix-org/erikj/split_as_storesErik Johnston2018-02-271-9/+22
|\ \ \ \ \ | | | | | | | | | | | | Split AS stores
| * | | | | Add commentErik Johnston2018-02-271-0/+4
| | | | | |
| * | | | | Update copyrightErik Johnston2018-02-231-0/+1
| | | | | |
| * | | | | Split AS storesErik Johnston2018-02-211-9/+17
| |/ / / /
* | | | | Merge pull request #2892 from matrix-org/erikj/batch_inserts_push_actionsErik Johnston2018-02-261-17/+36
|\ \ \ \ \ | | | | | | | | | | | | Batch inserts into event_push_actions_staging
| * | | | | Batch inserts into event_push_actions_stagingErik Johnston2018-02-201-17/+36
| | | | | |
* | | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-02-269-560/+700
|\ \ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | erikj/handle_unpersisted_events_push
| * | | | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-02-237-424/+532
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | erikj/split_event_push_actions
| | * \ \ \ \ Merge pull request #2902 from matrix-org/erikj/split_events_storeErik Johnston2018-02-232-359/+402
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Split out get_events and co into a worker store
| | | * | | | | Split EventsWorkerStore into separate fileErik Johnston2018-02-232-360/+400
| | | | | | | |
| | | * | | | | 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
| | | | |/ / | | | |/| |
| | * | | | Merge pull request #2899 from matrix-org/erikj/split_pushersErik Johnston2018-02-231-4/+7
| | |\ \ \ \ | | | | | | | | | | | | | | Split PusherStore
| | | * | | | Update copyrightErik Johnston2018-02-231-0/+1
| | | | | | |
| | | * | | | Split PusherStoreErik Johnston2018-02-211-4/+6
| | | |/ / /
| | * | | | Merge pull request #2898 from matrix-org/erikj/split_push_rules_storeErik Johnston2018-02-232-28/+57
| | |\ \ \ \ | | | | | | | | | | | | | | Split PushRulesStore
| | | * | | | Update copyrightErik Johnston2018-02-232-0/+2
| | | | | | |
| | | * | | | Split PushRulesStoreErik Johnston2018-02-212-28/+55
| | | |/ / /
| | * | | | Update copyrightErik Johnston2018-02-232-0/+2
| | | | | |
| | * | | | Use absolute importsErik Johnston2018-02-232-3/+3
| | | | | |
| | * | | | Split AccountDataStore and TagStoreErik Johnston2018-02-213-33/+65
| | |/ / /
| * | | | Update copyrightErik Johnston2018-02-232-0/+2
| | | | |
| * | | | Split out EventPushActionWorkerStoreErik Johnston2018-02-211-71/+73
| |/ / /
| * | | Raise exception in abstract methodErik Johnston2018-02-201-1/+1
| | | |
| * | | Fix commentErik Johnston2018-02-201-1/+1
| | | |
| * | | Use abstract base class to access stream IDsErik Johnston2018-02-201-15/+27
| | | |
| * | | Split ReceiptsStoreErik Johnston2018-02-202-48/+64
| |/ /
* | | Actually use new paramErik Johnston2018-02-211-1/+3
| | |
* | | Ensure all push actions are deleted from stagingErik Johnston2018-02-202-2/+19
| | |
* | | Refactor _set_push_actions_for_event_and_users_txn to use events_and_contextsErik Johnston2018-02-202-33/+41
|/ /
* | (Really) fix tablescan of event_push_actions on purgeRichard van der Hoff2018-02-161-1/+0
| | | | | | | | | | commit 278d21b5 added new code to avoid the tablescan, but didn't remove the old :/
* | Fix typo of double is_highlightErik Johnston2018-02-161-1/+1
| |
* | CommentsErik Johnston2018-02-162-1/+6
| |
* | Ensure that we delete staging push actions on errorsErik Johnston2018-02-151-0/+16
| |
* | Remove context.push_actionsErik Johnston2018-02-151-4/+3
| |
* | Update event_push_actions table from staging tableErik Johnston2018-02-152-22/+39
| |
* | Store push actions in staging areaErik Johnston2018-02-152-0/+51
| |
* | Don't serialize current state over replicationErik Johnston2018-02-151-0/+14
| |
* | Fix state group storage bug in workersErik Johnston2018-02-151-41/+41
| | | | | | | | | | We needed to move `_count_state_group_hops_txn` to the StateGroupWorkerStore.
* | Merge pull request #2867 from matrix-org/rav/rework_purgeRichard van der Hoff2018-02-151-35/+83
|\ \ | | | | | | purge_history cleanups
| * | purge_history: fix sqlite syntax errorRichard van der Hoff2018-02-141-1/+4
| | | | | | | | | | | | apparently sqlite insists on indexes being named
| * | purge_history: handle sqlite asshatteryRichard van der Hoff2018-02-141-19/+27
| | | | | | | | | | | | | | | apparently creating a temporary table commits the transaction. because that's a useful thing.
| * | purge_history: fix index useRichard van der Hoff2018-02-141-0/+14
| | | | | | | | | | | | | | | event_push_actions doesn't have an index on event_id, so we need to specify room_id.
| * | Rework event purge to use a temporary tableRichard van der Hoff2018-02-141-35/+58
| | | | | | | | | | | | | | | ... which should speed things up by reducing the amount of data being shuffled across the connection
* | | Merge pull request #2769 from matrix-org/matthew/hit_the_ginRichard van der Hoff2018-02-145-20/+110
|\ \ \ | | | | | | | | switch back from GIST to GIN indexes
| * | | remove overzealous exception handlingRichard van der Hoff2018-02-141-18/+10
| | | |
| * | | Merge branch 'matthew/gin_work_mem' into matthew/hit_the_ginRichard van der Hoff2018-02-1313-312/+605
| |\ \ \
| | * \ \ Merge branch 'develop' into matthew/gin_work_memRichard van der Hoff2018-02-138-223/+390
| | |\ \ \
| | * | | | Factor out common code for search insertRichard van der Hoff2018-02-041-33/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we can reuse the same code as is used for event insert, for doing the background index population.
| | * | | | Clean up work_mem handlingRichard van der Hoff2018-02-031-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some comments and improve exception handling when twiddling work_mem for the search update
| | * | | | Move store_event_search_txn to SearchStoreRichard van der Hoff2018-02-032-37/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... as a precursor to making event storing and doing the bg update share some code.
| | * | | | Merge branch 'develop' into matthew/gin_work_memRichard van der Hoff2018-02-037-39/+100
| | |\ \ \ \
| | * | | | | oopshera2018-01-092-2/+2
| | | | | | |
| | * | | | | oops, tweak work_mem when actually storingMatthew Hodgson2018-01-091-0/+2
| | | | | | |
| | * | | | | avoid 80s GIN inserts by tweaking work_memMatthew Hodgson2018-01-091-0/+4
| | | |_|_|/ | | |/| | | | | | | | | | | | | | | see https://github.com/matrix-org/synapse/issues/2753 for details
| * | | | | move search reindex to schema 47Richard van der Hoff2018-02-132-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're up to schema v47 on develop now, so this will have to go in there to have an effect. This might cause an error if somebody has already run it in the v46 guise, and runs it again in the v47 guise, because it will cause a duplicate entry in the bbackground_updates table. On the other hand, the entry is removed once it is complete, and it is unlikely that anyone other than matrix.org has run it on v46. The update itself is harmless to re-run because it deliberately copes with the index already existing.
| * | | | | GIN reindex: Fix syntax errors, improve exception handlingRichard van der Hoff2018-02-131-13/+27
| | | | | |
| * | | | | Reinstate event_search_postgres_gist handlerRichard van der Hoff2018-02-023-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | People may have queued updates for this, so we can't just delete it.
| * | | | | fix GIST->GIN switchMatthew Hodgson2018-01-093-14/+37
| | | | | |
| * | | | | switch back from GIST to GIN indexesMatthew Hodgson2018-01-091-8/+13
| |/ / / /
* | | | | Merge pull request #2854 from matrix-org/erikj/event_create_workerErik Johnston2018-02-131-0/+13
|\ \ \ \ \ | |_|_|_|/ |/| | | | Create a worker for event creation
| * | | | Add replication http endpoint for event sendingErik Johnston2018-02-071-0/+13
| | | | |
* | | | | Fix log message in purge_historyRichard van der Hoff2018-02-131-2/+1
| | | | | | | | | | | | | | | | | | | | (we don't just remove remote events)
* | | | | Merge pull request #2864 from matrix-org/rav/persist_event_cachingRichard van der Hoff2018-02-131-56/+40
|\ \ \ \ \ | |_|_|_|/ |/| | | | Use StateResolutionHandler to resolve state in persist_events
| * | | | style nitRichard van der Hoff2018-02-131-1/+1
| | | | |
| * | | | Use StateResolutionHandler to resolve state in persist eventsRichard van der Hoff2018-02-051-48/+24
| | | | | | | | | | | | | | | | | | | | ... and thus benefit (hopefully) from its cache.
| * | | | Flatten _get_new_state_after_eventsRichard van der Hoff2018-02-051-44/+46
| | | | | | | | | | | | | | | | | | | | rejig the if statements to simplify the logic and reduce indentation
| * | | | 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
|\ \ \ \ \ | |_|/ / / |/| | | | delete_local_events for purge_room_history
| * | | | purge: move room_depth update to endRichard van der Hoff2018-02-091-6/+12
| | | | | | | | | | | | | | | | | | | | ... to avoid locking the table for too long
| * | | | delete_local_events for purge_historyRichard van der Hoff2018-02-091-7/+28
| | | | | | | | | | | | | | | | | | | | Add a flag which makes the purger delete local events
| * | | | purge: Move cache invalidation to more appropriate placeRichard van der Hoff2018-02-091-4/+4
| | | | | | | | | | | | | | | | | | | | it was a bit of a non-sequitur there
| * | | | bump purge logging to infoRichard van der Hoff2018-02-091-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | this thing takes ages and the only sign of any progress is the logs, so having some logs is useful.
| * | | | rename delete_old_state -> purge_historyRichard van der Hoff2018-02-091-7/+7
| | | | | | | | | | | | | | | | | | | | (beacause it deletes more than state)