summary refs log tree commit diff
path: root/synapse/storage (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update copyrightErik Johnston2018-02-232-0/+2
|
* Use absolute importsErik Johnston2018-02-232-3/+3
|
* Split AccountDataStore and TagStoreErik Johnston2018-02-213-33/+65
|
* 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
|
* (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)
* | | | | Store state groups separately from events (#2784)Erik Johnston2018-02-066-103/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split state group persist into seperate storage func * Add per database engine code for state group id gen * Move store_state_group to StateReadStore This allows other workers to use it, and so resolve state. * Hook up store_state_group * Fix tests * Rename _store_mult_state_groups_txn * Rename StateGroupReadStore * Remove redundant _have_persisted_state_group_txn * Update comments * Comment compute_event_context * Set start val for state_group_id_seq ... otherwise we try to recreate old state groups * Update comments * Don't store state for outliers * Update comment * Update docstring as state groups are ints
* | | | | Merge pull request #2849 from matrix-org/rav/clean_up_state_deltaRichard van der Hoff2018-02-051-10/+23
|\ \ \ \ \ | | |/ / / | |/| | | Remove redundant return value from _calculate_state_delta
| * | | | Remove redundant return value from _calculate_state_deltaRichard van der Hoff2018-02-051-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | we already have the state from _get_new_state_after_events, so returning it from _calculate_state_delta is just confusing.
* | | | | Factor out common code for search insertRichard van der Hoff2018-02-051-33/+62
| | | | | | | | | | | | | | | | | | | | | | | | | we can reuse the same code as is used for event insert, for doing the background index population.
* | | | | Move store_event_search_txn to SearchStoreRichard van der Hoff2018-02-052-35/+41
|/ / / / | | | | | | | | | | | | | | | | ... as a precursor to making event storing and doing the bg update share some code.
* | | | Merge pull request #2841 from matrix-org/rav/refactor_calc_state_deltaRichard van der Hoff2018-02-021-18/+39
|\ \ \ \ | | | | | | | | | | factor _get_new_state_after_events out of _calculate_state_delta
| * | | | factor _get_new_state_after_events out of _calculate_state_deltaRichard van der Hoff2018-01-311-18/+39
| | | | | | | | | | | | | | | | | | | | This reduces the scope of a bunch of variables
* | | | | Merge branch 'develop' into travis/admin-list-mediaTravis Ralston2018-02-013-11/+11
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | Merge pull request #2837 from matrix-org/rav/fix_quarantine_mediaRichard van der Hoff2018-02-011-1/+1
| |\ \ \ \ | | |/ / / | |/| | | Fix sql error in quarantine_media
| | * | | Fix sql error in quarantine_mediaRichard van der Hoff2018-01-301-1/+1
| | | | |
| * | | | Improve exception handling in persist_eventRichard van der Hoff2018-01-291-3/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. use `deferred.errback()` instead of `deferred.errback(e)`, which means that a Failure object will be constructed using the current exception state, *including* its stack trace - so the stack trace is saved in the Failure, leading to better exception reports. 2. Set `consumeErrors=True` on the ObservableDeferred, because we know that there will always be at least one observer - which avoids a spurious "CRITICAL: unhandled exception in Deferred" error in the logs
| * / / Fix SQL for user searchRichard van der Hoff2018-01-271-7/+7
| |/ / | | | | | | | | | | | | | | | fix some syntax errors for user search when search_all_users is enabled fixes #2801, hopefully
* | | pep8Travis Ralston2018-01-311-9/+12
| | | | | | | | | Signed-off-by: Travis Ralston <travpc@gmail.com>
* | | Documentation and namingTravis Ralston2018-01-311-7/+26
| | | | | | | | | Signed-off-by: Travis Ralston <travpc@gmail.com>
* | | Appease the linterTravis Ralston2018-01-201-5/+5
| | | | | | | | | | | | | | | These are ids anyways, not mxc uris. Signed-off-by: Travis Ralston <travpc@gmail.com>
* | | Add an admin route to get all the media in a roomTravis Ralston2018-01-201-56/+75
|/ / | | | | | | | | This is intended to be used by administrators to monitor the media that is passing through their server, if they wish. Signed-off-by: Travis Ralston <travpc@gmail.com>
* | Merge pull request #2805 from matrix-org/rav/log_state_resRichard van der Hoff2018-01-171-0/+6
|\ \ | | | | | | Log room when doing state resolution
| * | Log room when doing state resolutionRichard van der Hoff2018-01-171-0/+6
| | | | | | | | | | | | Mostly because it helps figure out what is prompting the resolution
* | | Merge pull request #2783 from matrix-org/erikj/media_last_accessedErik Johnston2018-01-173-4/+37
|\ \ \ | | | | | | | | Keep track of last access time for local media
| * | | Remove lost commentErik Johnston2018-01-171-3/+0
| | | |
| * | | Keep track of last access time for local mediaErik Johnston2018-01-173-4/+40
| | | |
* | | | Merge pull request #2803 from matrix-org/matthew/fix-userdir-sqlMatthew Hodgson2018-01-171-2/+7
|\ \ \ \ | | | | | | | | | | fix SQL when searching all users
| * | | | fix SQL when searching all usersMatthew Hodgson2018-01-171-2/+7
| | | | |
* | | | | Split resolve_events into two functionsRichard van der Hoff2018-01-171-2/+2
|/ / / / | | | | | | | | | | | | ... so that the return type doesn't depend on the arg types
* | | | Track DB scheduling delay per-requestRichard van der Hoff2018-01-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | For each request, track the amount of time spent waiting for a db connection. This entails adding it to the LoggingContext and we may as well add metrics for it while we are passing.
* | | | rework runInteraction in terms of runConnectionRichard van der Hoff2018-01-161-20/+31
|/ / / | | | | | | | | | ... so that we can share the code
* / / Fix a logcontext leak in persist_eventsRichard van der Hoff2018-01-161-1/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | ObserveableDeferred expects its callbacks to be called without any logcontexts, whereas it turns out we were calling them with the logcontext of the request which initiated the persistence loop. It seems wrong that we are attributing work done in the persistence loop to the request that happened to initiate it, so let's solve this by dropping the logcontext for it. (I'm not sure this actually causes any real problems other than messages in the debug log, but let's clean it up anyway)
* / Remove dead code related to default thumbnailsErik Johnston2018-01-091-3/+0
|/
* fix StoreError syntaxMatthew Hodgson2017-12-051-1/+1
|
* fix pep8 and testsMatthew Hodgson2017-12-041-4/+3
|
* switch to a simpler 'search_all_users' button as per review feedbackMatthew Hodgson2017-12-041-24/+16
|
* Merge branch 'develop' into matthew/search-all-local-usersMatthew Hodgson2017-11-307-55/+143
|\
| * Remove pushers when deleting access tokensRichard van der Hoff2017-11-291-5/+5
| | | | | | | | | | Whenever an access token is invalidated, we should remove the associated pushers.
| * Merge pull request #2697 from matrix-org/rav/fix_urlcache_index_errorRichard van der Hoff2017-11-275-14/+82
| |\ | | | | | | Fix error on sqlite 3.7
| | * fix sql failsRichard van der Hoff2017-11-221-1/+1
| | |
| | * Check database in has_completed_background_updatesRichard van der Hoff2017-11-222-11/+32
| | | | | | | | | | | | so that the right thing happens on workers.
| | * Fix error on sqlite 3.7Richard van der Hoff2017-11-214-5/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create the url_cache index on local_media_repository as a background update, so that we can detect whether we are on sqlite or not and create a partial or complete index accordingly. To avoid running the cleanup job before we have built the index, add a bailout which will defer the cleanup if the bg updates are still running. Fixes https://github.com/matrix-org/synapse/issues/2572.
| * | Avoid retrying forever on IntegrityErrorRichard van der Hoff2017-11-271-0/+7
| | |
| * | Merge pull request #2689 from matrix-org/rav/unlock_account_data_upsertRichard van der Hoff2017-11-211-36/+49
| |\ \ | | |/ | |/| Avoid locking account_data tables for upserts
| | * Avoid locking account_data tables for upsertsRichard van der Hoff2017-11-161-36/+49
| | |
* | | remove null constraint on user_dir.room_idMatthew Hodgson2017-11-301-0/+35
| | |
* | | fix alternation operator for FTS4 - how did this ever work!?Matthew Hodgson2017-11-301-1/+1
| | |
* | | fix thinkos galoreMatthew Hodgson2017-11-302-16/+35
| | |
* | | untested WIP but might actually workMatthew Hodgson2017-11-293-13/+38
| | |
* | | Add user_directory_include_pattern config param to expand search results to ↵Matthew Hodgson2017-11-291-4/+12
|/ / | | | | | | | | | | | | | | | | | | additional users Initial commit; this doesn't work yet - the LIKE filtering seems too aggressive. It also needs _do_initial_spam to be aware of prepopulating the whole user_directory_search table with all users... ...and it needs a handle_user_signup() or something to be added so that new signups get incrementally added to the table too. Committing it here as a WIP
* / Avoid locking for upsert on pushers tablesRichard van der Hoff2017-11-162-5/+51
|/ | | | | * replace the upsert into deleted_pushers with an insert * no need to lock for upsert on pusher_throttle
* Fix broken ref to IntegrityErrorRichard van der Hoff2017-11-161-1/+1
|
* Avoid locking `pushers` table on upsertRichard van der Hoff2017-11-161-27/+28
| | | | | Now that _simple_upsert will retry on IntegrityError, we don't need to lock the table.
* _simple_upsert: retry on IntegrityErrorRichard van der Hoff2017-11-161-6/+29
| | | | | | wrap the call to _simple_upsert_txn in a loop so that we retry on an integrityerror: this means we can avoid locking the table provided there is an unique index.
* Cleanup in _simple_upsert_txnRichard van der Hoff2017-11-161-16/+17
| | | | Bail out early to reduce indentation
* Merge pull request #2661 from matrix-org/rav/statereadstoreRichard van der Hoff2017-11-152-216/+231
|\ | | | | Pull out bits of StateStore to a mixin
| * Pull out bits of StateStore to a mixinRichard van der Hoff2017-11-141-204/+220
| | | | | | | | | | | | | | | | | | ... so that we don't need to secretly gut-wrench it for use in the slaved stores. I haven't done the other stores yet, but we should. I'm tired of the workers breaking every time we tweak the stores because I forgot to gut-wrench the right method. fixes https://github.com/matrix-org/synapse/issues/2655.
| * Revert "Revert "move _state_group_cache to statestore""Richard van der Hoff2017-11-142-13/+12
| | | | | | | | | | | | | | We're going to fix this properly on this branch, so that the _state_group_cache can end up in StateGroupReadStore. This reverts commit ab335edb023d66cd0be439e045b10ca104b73cb5.
* | Merge pull request #2675 from matrix-org/rav/remove_broken_logcontext_funcsRichard van der Hoff2017-11-151-2/+2
|\ \ | |/ |/| Remove preserve_context_over_{fn, deferred}
| * Remove preserve_context_over_{fn, deferred}Richard van der Hoff2017-11-141-2/+2
| | | | | | | | | | Both of these functions ae known to leak logcontexts. Replace the remaining calls to them and kill them off.
* | Make __init__ consitstent across Store heirarchyRichard van der Hoff2017-11-1316-32/+32
|/ | | | | | Add db_conn parameters to the `__init__` methods of the *Store classes, so that they are all consistent, which makes the multiple inheritance work correctly (and so that we can later extract mixins which can be used in the slavedstores)
* Revert "move _state_group_cache to statestore"Erik Johnston2017-11-132-12/+13
| | | | This reverts commit f5cf3638e9c6086e1c33ddad8eda9298cf53a58e.
* Up cache size of get_global_account_data_by_type_for_userErik Johnston2017-11-131-1/+1
|
* Fix typoErik Johnston2017-11-091-1/+1
|
* Merge pull request #2656 from matrix-org/rav/fix_deactivateRichard van der Hoff2017-11-091-2/+1
|\ | | | | Fix 'NoneType' not iterable in /deactivate
| * Fix 'NoneType' not iterable in /deactivateRichard van der Hoff2017-11-091-2/+1
| | | | | | | | make sure we actually return a value from user_delete_access_tokens
* | Have an explicit API to update room configErik Johnston2017-11-081-0/+13
| |
* | Revert "Modify group room association API to allow modification of is_public"Erik Johnston2017-11-081-13/+7
| |
* | Merge pull request #2637 from spantaleev/avoid-noop-media-deletesErik Johnston2017-11-081-0/+6
|\ \ | | | | | | Avoid no-op media deletes
| * | Avoid no-op media deletesSlavi Pantaleev2017-11-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | If there are no media entries to delete, avoid creating transactions, prepared statements and unnecessary log entries. Signed-off-by: Slavi Pantaleev <slavi@devture.com>
* | | Merge pull request #2649 from matrix-org/rav/fix_delta_on_state_resRichard van der Hoff2017-11-082-13/+12
|\ \ \ | | | | | | | | Fix bug in state group storage
| * | | move _state_group_cache to statestoreRichard van der Hoff2017-11-072-13/+12
| | |/ | |/| | | | | | | this is internal to statestore, so let's keep it there.
* | | Merge pull request #2643 from matrix-org/matthew/user_dir_typosMatthew Hodgson2017-11-074-12/+36
|\ \ \ | |/ / |/| | Fix various embarrassing typos around user_directory and add some doc.
| * | create new indexes before dropping old ones to keep safetynet in placeMatthew Hodgson2017-11-071-2/+4
| | |
| * | s/users_in_pubic_room/users_in_public_rooms/gMatthew Hodgson2017-11-041-2/+2
| | |
| * | s/users_in_pubic_room/users_in_public_rooms/gMatthew Hodgson2017-11-042-10/+32
| | |
| * | fix copyright....Matthew Hodgson2017-11-041-1/+1
| | |
| * | s/popualte/populate/Matthew Hodgson2017-11-041-1/+1
| |/
* / Remember to pick is_admin out of the dbLuke Barnard2017-11-071-1/+1
|/
* Notify auth providers on logoutRichard van der Hoff2017-11-011-5/+8
| | | | Provide a hook by which auth providers can be notified of logouts.
* Merge pull request #2617 from matrix-org/matthew/auto-displaynameMatthew Hodgson2017-11-011-2/+4
|\ | | | | automatically set default displayname on register
| * switch to setting default displayname in the storage layerMatthew Hodgson2017-11-011-2/+4
| | | | | | | | to avoid clobbering guest user displaynames on registration
* | Merge pull request #2613 from matrix-org/rav/kill_refresh_tokensDavid Baker2017-11-014-58/+14
|\ \ | |/ |/| Remove the last vestiges of refresh_tokens
| * Remove the last vestiges of refresh_tokensRichard van der Hoff2017-10-314-58/+14
| |
* | Merge pull request #2612 from matrix-org/luke/groups-room-relationship-is-publicLuke Barnard2017-11-011-7/+13
|\ \ | |/ |/| Modify group room association API to allow modification of is_public
| * Leave `is_public` as required argument of update_room_group_associationLuke Barnard2017-11-011-1/+1
| |
| * Modify group room association API to allow modification of is_publicLuke Barnard2017-10-311-7/+13
| | | | | | | | also includes renamings to make things more consistent.
* | DB schema interface for password auth providersRichard van der Hoff2017-10-312-0/+77
|/ | | | | Provide an interface by which password auth providers can register db schema files to be run at startup
* Merge branch 'erikj/attestation_local_fix' of github.com:matrix-org/synapse ↵Erik Johnston2017-10-271-0/+18
|\ | | | | | | into develop
| * FixupErik Johnston2017-10-271-2/+2
| |
| * Remove incorrect attestationsErik Johnston2017-10-271-0/+18
| |
* | Request is_public from databaseLuke Barnard2017-10-271-1/+3
| |
* | Create groups with is_public = TrueLuke Barnard2017-10-271-0/+1
| |
* | Recreate groups table instead of adding columnLuke Barnard2017-10-261-2/+16
| | | | | | | | Adding a column with non-constant default not possible in sqlite3
* | Awful hack to get default trueLuke Barnard2017-10-261-1/+2
| |
* | Bump schema version to 46Luke Barnard2017-10-261-1/+1
| |
* | Add is_public to groups table to allow for private groupsLuke Barnard2017-10-261-0/+17
|/ | | | | | Prevent group API access to non-members for private groups Also make all the group code paths consistent with `requester_user_id` always being the User ID of the requesting user.
* replace 'except:' with 'except Exception:'Richard van der Hoff2017-10-237-8/+8
| | | | what could possibly go wrong
* Fix logcontext handling for persist_eventsRichard van der Hoff2017-10-171-7/+17
| | | | | | | | * don't use preserve_context_over_deferred, which is known broken. * remove a redundant preserve_fn. * add/improve some comments
* Implement GET /groups/$groupId/invited_usersLuke Barnard2017-10-161-0/+12
|
* peeeeeeeeep8888888888888888888888888888Erik Johnston2017-10-111-1/+1
|
* Fix group stream replicationErik Johnston2017-10-111-7/+7
| | | | | The stream update functions expect the storage function to return a list of tuples.
* Fix schema delta versionsErik Johnston2017-10-113-1/+1
|
* Merge pull request #2466 from matrix-org/erikj/groups_mergedErik Johnston2017-10-116-20/+1529
|\ | | | | Initial Group Implementation
| * Merge branch 'develop' into erikj/groups_mergedDavid Baker2017-10-024-23/+129
| |\
| * | Add remove room APIErik Johnston2017-09-261-0/+23
| | |
| * | Add unique index to group_rooms tableErik Johnston2017-09-261-1/+1
| | |
| * | Remove user from group summary when the leave the groupErik Johnston2017-09-211-0/+8
| | |
| * | Correctly return next tokenErik Johnston2017-09-201-1/+2
| | |
| * | Fix initial syncErik Johnston2017-09-201-1/+9
| | |
| * | Add user profiles to summary from group serverErik Johnston2017-08-251-1/+1
| | |
| * | Add remote profile cacheErik Johnston2017-08-252-0/+126
| | |
| * | Add _simple_updateErik Johnston2017-08-251-19/+32
| | |
| * | Merge pull request #2410 from matrix-org/erikj/groups_publiciseErik Johnston2017-08-212-0/+32
| |\ \ | | | | | | | | Add ability to publicise group membership
| | * | Use BOOLEAN rather than TEXT typeErik Johnston2017-08-211-1/+1
| | | |
| | * | Add bulk group publicised lookup APIErik Johnston2017-08-091-0/+14
| | | |
| | * | Allow update group publicityErik Johnston2017-08-081-0/+15
| | | |
| | * | Store whether the user wants to publicise their membership of a groupErik Johnston2017-08-082-0/+3
| | | |
| * | | Groups: Fix mising json.load in initial syncErik Johnston2017-08-211-1/+7
| |/ /
| * | Update commentErik Johnston2017-07-241-2/+2
| | |
| * | Use join rather than joined, etc.Erik Johnston2017-07-241-2/+2
| | |
| * | Fix all the typosErik Johnston2017-07-241-8/+7
| | |
| * | Include users membership in group in summary APIErik Johnston2017-07-241-0/+55
| | |
| * | Check users/rooms are in group before adding to summaryErik Johnston2017-07-241-0/+25
| | |
| * | Merge pull request #2378 from matrix-org/erikj/group_sync_supportErik Johnston2017-07-213-5/+110
| |\ \ | | | | | | | | Add groups to sync stream
| | * | Fix replication. And notifyErik Johnston2017-07-201-0/+23
| | | |
| | * | Add groups to sync streamErik Johnston2017-07-203-5/+87
| | | |
| * | | Merge pull request #2377 from matrix-org/erikj/group_profile_updateErik Johnston2017-07-201-0/+11
| |\ \ \ | | |/ / | |/| | Add update group profile API
| | * | Fix a storage descErik Johnston2017-07-201-1/+1
| | | |
| | * | Add update group profile APIErik Johnston2017-07-201-0/+11
| | | |
| * | | Fix typoErik Johnston2017-07-201-1/+1
| |/ /
| * | Fix typosErik Johnston2017-07-181-8/+17
| | |
| * | CommentErik Johnston2017-07-181-0/+14
| | |
| * | Remove sync stuffErik Johnston2017-07-182-29/+1
| | |
| * | Remove unused tablesErik Johnston2017-07-181-7/+0
| | |
| * | Remove sync stuffErik Johnston2017-07-182-70/+0
| | |
| * | Add local group server supportErik Johnston2017-07-173-0/+195
| | |
| * | Add DEFAULT_ROLE_IDErik Johnston2017-07-141-4/+5
| | |
| * | Correctly increment ordersErik Johnston2017-07-141-2/+2
| | |
| * | Remove unused functionsErik Johnston2017-07-131-152/+0
| | |
| * | CommentsErik Johnston2017-07-131-12/+24
| | |
| * | CommentsErik Johnston2017-07-122-5/+41
| | |
| * | Add group summary APIsErik Johnston2017-07-122-0/+699
| | |
| * | CommentErik Johnston2017-07-121-1/+1
| | |
| * | Move commentErik Johnston2017-07-111-2/+2
| | |
| * | Rename column to attestation_jsonErik Johnston2017-07-112-5/+5
| | |
| * | CommentsErik Johnston2017-07-111-2/+2
| | |
| * | CommentsErik Johnston2017-07-112-4/+34
| | |
| * | Initial group server implementationErik Johnston2017-07-103-1/+359
| | |
* | | Fix up commentErik Johnston2017-10-091-1/+2
| | |
* | | Invalidate cacheErik Johnston2017-10-031-0/+3
| | |
* | | Update commentsErik Johnston2017-10-031-0/+7
| | |
* | | Ignore incoming events for rooms that we have leftErik Johnston2017-10-031-0/+32
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When synapse receives an event for a room its not in over federation, it double checks with the remote server to see if it is in fact in the room. This is done so that if the server has forgotten about the room (usually as a result of the database being dropped) it can recover from it. However, in the presence of state resets in large rooms, this can cause a lot of work for servers that have legitimately left. As a hacky solution that supports both cases we drop incoming events for rooms that we have explicitly left. This means that we no longer support the case of servers having forgotten that they've rejoined a room, but that is sufficiently rare that we're not going to support it for now.
* | Up the limits on number of url cache entries to delete at one timeErik Johnston2017-09-281-2/+2
| |
* | Add old indicesErik Johnston2017-09-281-0/+2
| |
* | Only pull out local media that were for url cacheErik Johnston2017-09-281-1/+1
| |
* | Fix typoErik Johnston2017-09-281-3/+3
| |
* | Change expires column to expires_tsErik Johnston2017-09-282-8/+27
| |
* | More bracketsErik Johnston2017-09-281-1/+1
| |
* | Delete expired url cache dataErik Johnston2017-09-283-1/+79
| |
* | Invalidate signing key cache when we gat an updateRichard van der Hoff2017-09-201-17/+24
|/ | | | This might make the cache slightly more efficient.
* Perf: Don't filter events for pushErik Johnston2017-07-071-0/+13
| | | | | We know the users are joined and we can explicitly check for if they are ignoring the user, so lets do that.
* Merge pull request #2309 from matrix-org/erikj/user_ip_replErik Johnston2017-07-061-3/+5
|\ | | | | Fix up user_ip replication commands
| * Fix upErik Johnston2017-06-271-3/+5
| |
* | Define CACHE_SIZE_FACTOR onceErik Johnston2017-07-042-8/+3
| |
* | Make into listErik Johnston2017-06-291-1/+1
| |
* | Prefill forward extrems and event to state groupsErik Johnston2017-06-292-2/+13
|/
* Fix up client ips to read from pending dataErik Johnston2017-06-272-21/+59
|
* Batch upsert user ipsErik Johnston2017-06-271-19/+38
|
* Fix up indices for users_who_share_roomsErik Johnston2017-06-261-1/+2
|
* Store URL cache preview downloads seperatelyErik Johnston2017-06-232-2/+22
| | | | This makes it easier to clear old media out at a later date
* Add descErik Johnston2017-06-221-0/+1
|
* Merge pull request #2296 from matrix-org/erikj/dont_appserver_sharErik Johnston2017-06-211-15/+20
|\ | | | | Don't work out users who share room with appservice users
| * Initialise exclusive_user_regexErik Johnston2017-06-211-15/+20
| |
* | Merge branch 'develop' into avoid_duplicate_filtersKrombel2017-06-2125-223/+1652
|\|
| * Handle thumbnail urlsErik Johnston2017-06-191-12/+14
| |
| * Add API to quarantine mediaErik Johnston2017-06-193-2/+89
| |
| * Add shutdown room APIErik Johnston2017-06-193-0/+59
| |
| * Merge pull request #2286 from matrix-org/erikj/split_out_user_dirErik Johnston2017-06-161-0/+18
| |\ | | | | | | Split out user directory to a separate process
| | * Initial worker implErik Johnston2017-06-161-0/+18
| | |
| * | Merge pull request #2280 from matrix-org/erikj/share_room_user_dirErik Johnston2017-06-163-31/+299
| |\| | | | | | | Include users who you share a room with in user directory
| | * Include users who share room with requester in user directoryErik Johnston2017-06-151-22/+39
| | |
| | * Implement updating users who share rooms on the flyErik Johnston2017-06-151-1/+110
| | |
| | * Implement initial population of users who share rooms tableErik Johnston2017-06-151-7/+117
| | |
| | * Add DB schema for tracking users who share roomsErik Johnston2017-06-152-1/+33
| | |
| * | Merge pull request #2281 from matrix-org/erikj/phone_home_statsErik Johnston2017-06-153-70/+70
| |\ \ | | |/ | |/| Fix phone home stats
| | * Add some more statsErik Johnston2017-06-152-0/+28
| | |
| | * Fix phone home statsErik Johnston2017-06-142-71/+43
| | |
| * | Fix user directory insertion due to missing room_idErik Johnston2017-06-131-1/+2
| | |
| * | Fix up sqlErik Johnston2017-06-131-10/+12
| | |
| * | Fix user dir to not assume existence of userErik Johnston2017-06-131-22/+37
| | |
| * | Merge pull request #2274 from matrix-org/erikj/cache_is_host_joinedErik Johnston2017-06-132-1/+6
| |\ \ | | | | | | | | Add cache for is_host_joined
| | * | Add cache for is_host_joinedErik Johnston2017-06-132-1/+6
| | | |
| * | | Tweak the ranking of PG user dir searchErik Johnston2017-06-131-13/+40
| |/ /
| * | Merge pull request #2266 from matrix-org/erikj/host_in_roomErik Johnston2017-06-121-29/+26
| |\ \ | | | | | | | | Change is_host_joined to use current_state table
| | * | Tweak SQLErik Johnston2017-06-091-3/+6
| | | |
| | * | Change is_host_joined to use current_state tableErik Johnston2017-06-091-29/+23
| | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | | Fix replicationErik Johnston2017-06-091-1/+1
| | | |
| * | | CommentsErik Johnston2017-06-091-0/+3
| | | |
| * | | Cache state deltasErik Johnston2017-06-091-3/+12
| |/ /
| * | Ensure we don't use unpersisted state group as prev groupErik Johnston2017-06-081-0/+13
| | |
| * | Merge pull request #2259 from matrix-org/erikj/fix_state_woesErik Johnston2017-06-073-10/+24
| |\ \ | | | | | | | | Fix bug where state_group tables got corrupted
| | * | Fix bug where state_group tables got corruptedErik Johnston2017-06-073-10/+24
| | |/ | | | | | | | | | | | | | | | | | | | | | This is due to the fact that we prefilled caches using txn.call_after, which always gets called including on error. We fix this by making txn.call_after only fire when a transaction completes successfully, which is what we want most of the time anyway.