Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Move storage classes into a main "data store". | Erik Johnston | 2019-10-21 | 1 | -581/+0 |
| | | | | | This is in preparation for having multiple data stores that offer different functionality, e.g. splitting out state or event storage. | ||||
* | Cleanup client_ips | Brendan Abolivier | 2019-10-08 | 1 | -7/+0 |
| | |||||
* | Move client_ips's bg updates to a dedicated store | Brendan Abolivier | 2019-10-07 | 1 | -94/+106 |
| | |||||
* | Fix `devices_last_seen` background update. | Erik Johnston | 2019-09-30 | 1 | -7/+39 |
| | | | | Fixes #6134. | ||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2019-09-25 | 1 | -1/+1 |
|\ | | | | | | | erikj/cleanup_user_ips_2 | ||||
| * | Use if `is not None` | Erik Johnston | 2019-09-25 | 1 | -1/+1 |
| | | | | | | Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | ||||
* | | Review comments | Erik Johnston | 2019-09-25 | 1 | -1/+1 |
| | | |||||
* | | Prune rows in user_ips older than configured period | Erik Johnston | 2019-09-24 | 1 | -8/+54 |
|/ | | | | Defaults to pruning everything older than 28d. | ||||
* | Query devices table for last seen info. | Erik Johnston | 2019-09-23 | 1 | -49/+8 |
| | | | | | | | | This is a) simpler than querying user_ips directly and b) means we can purge older entries from user_ips without losing the required info. The storage functions now no longer return the access_token, since it was unused. | ||||
* | Add BG update to populate devices last seen info | Erik Johnston | 2019-09-23 | 1 | -0/+52 |
| | |||||
* | Add last seen info to devices table. | Erik Johnston | 2019-09-23 | 1 | -0/+15 |
| | | | | | This allows us to purge old user_ips entries without having to preserve the latest last seen info for active devices. | ||||
* | Replace returnValue with return (#5736) | Amber Brown | 2019-07-23 | 1 | -14/+12 |
| | |||||
* | Run black on the rest of the storage module (#4996) | Amber Brown | 2019-04-03 | 1 | -47/+38 |
| | |||||
* | Merge pull request #4627 from matrix-org/erikj/user_ips_analyze | Erik Johnston | 2019-02-12 | 1 | -0/+24 |
|\ | | | | | Analyze user_ips before running deduplication | ||||
| * | Fix pep8 | Erik Johnston | 2019-02-12 | 1 | -1/+1 |
| | | |||||
| * | Analyze user_ips before running deduplication | Erik Johnston | 2019-02-12 | 1 | -0/+24 |
| | | | | | | | | | | | | | | Due to the table locks taken out by the naive upsert, the table statistics may be out of date. During deduplication it is important that the correct index is used as otherwise a full table scan may be incorrectly used, which can end up thrashing the database badly. | ||||
* | | Reduce user_ips bloat during dedupe background update | Erik Johnston | 2019-02-12 | 1 | -3/+60 |
|/ | | | | | | | | | | | | The background update to remove duplicate rows naively deleted and reinserted the duplicates. For large tables with a large number of duplicates this causes a lot of bloat (with postgres), as the inserted rows are appended to the table, since deleted rows will not be overwritten until a VACUUM has happened. This should hopefully also help ensure that the query in the last batch uses the correct index, as inserting a large number of new rows without analyzing will upset the query planner. | ||||
* | Use native UPSERTs where possible (#4306) | Amber Brown | 2019-01-24 | 1 | -1/+4 |
| | |||||
* | Fixup removal of duplicate `user_ips` rows (#4432) | Erik Johnston | 2019-01-23 | 1 | -1/+5 |
| | | | | | | | | * Remove unnecessary ORDER BY clause * Add logging * Newsfile | ||||
* | Refactor to rewrite the SQL instead | Erik Johnston | 2019-01-22 | 1 | -13/+16 |
| | |||||
* | Don't shadow params | Erik Johnston | 2019-01-22 | 1 | -4/+3 |
| | |||||
* | Fix bug when removing duplicate rows from user_ips | Erik Johnston | 2019-01-22 | 1 | -13/+20 |
| | | | | | | | | This was caused by accidentally overwritting a `last_seen` variable in a for loop, causing the wrong value to be written to the progress table. The result of which was that we didn't scan sections of the table when searching for duplicates, and so some duplicates did not get deleted. | ||||
* | Remove duplicates in the user_ips table and add an index (#4370) | Amber Brown | 2019-01-12 | 1 | -4/+134 |
| | |||||
* | Fix client IPs being broken on Python 3 (#3908) | Amber Brown | 2018-09-20 | 1 | -15/+19 |
| | |||||
* | Run tests under PostgreSQL (#3423) | Amber Brown | 2018-08-13 | 1 | -0/+5 |
| | |||||
* | wip commit - tests failing | Neil Johnson | 2018-08-03 | 1 | -20/+1 |
| | |||||
* | do mau checks based on monthly_active_users table | Neil Johnson | 2018-08-02 | 1 | -7/+8 |
| | |||||
* | insertion into monthly_active_users | Neil Johnson | 2018-08-02 | 1 | -1/+21 |
| | |||||
* | Fix some looping_call calls which were broken in #3604 | Richard van der Hoff | 2018-07-26 | 1 | -1/+1 |
| | | | | | | | | | It turns out that looping_call does check the deferred returned by its callback, and (at least in the case of client_ips), we were relying on this, and I broke it in #3604. Update run_as_background_process to return the deferred, and make sure we return it to clock.looping_call. | ||||
* | Run things as background processes | Richard van der Hoff | 2018-07-18 | 1 | -4/+11 |
| | | | | | | | | This fixes #3518, and ensures that we get useful logs and metrics for lots of things that happen in the background. (There are certainly more things that happen in the background; these are just the common ones I've found running a single-process synapse locally). | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -5/+4 |
| | |||||
* | Pass around the reactor explicitly (#3385) | Amber Brown | 2018-06-22 | 1 | -2/+4 |
| | |||||
* | replace some iteritems with six | Adrian Tschira | 2018-05-19 | 1 | -2/+4 |
| | | | | Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | Generate user daily stats | Neil Johnson | 2018-04-25 | 1 | -0/+7 |
| | |||||
* | Add user_ips last seen index | Neil Johnson | 2018-03-28 | 1 | -0/+7 |
| | |||||
* | Make __init__ consitstent across Store heirarchy | Richard van der Hoff | 2017-11-13 | 1 | -2/+2 |
| | | | | | | 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) | ||||
* | Merge pull request #2309 from matrix-org/erikj/user_ip_repl | Erik Johnston | 2017-07-06 | 1 | -3/+5 |
|\ | | | | | Fix up user_ip replication commands | ||||
| * | Fix up | Erik Johnston | 2017-06-27 | 1 | -3/+5 |
| | | |||||
* | | Define CACHE_SIZE_FACTOR once | Erik Johnston | 2017-07-04 | 1 | -4/+2 |
|/ | |||||
* | Fix up client ips to read from pending data | Erik Johnston | 2017-06-27 | 1 | -11/+59 |
| | |||||
* | Batch upsert user ips | Erik Johnston | 2017-06-27 | 1 | -19/+38 |
| | |||||
* | Increase size of IP cache | Erik Johnston | 2017-06-07 | 1 | -1/+6 |
| | |||||
* | Increase client_ip cache size | Erik Johnston | 2017-05-08 | 1 | -0/+1 |
| | |||||
* | Bail on where clause instead | Erik Johnston | 2017-04-11 | 1 | -3/+4 |
| | |||||
* | Don't bother with outer check for now | Erik Johnston | 2017-04-11 | 1 | -3/+0 |
| | |||||
* | Fix getting latest device IP for user with no devices | Erik Johnston | 2017-04-11 | 1 | -0/+5 |
| | |||||
* | PEP8 | Richard van der Hoff | 2016-07-22 | 1 | -1/+0 |
| | |||||
* | Create index on user_ips in the background | Richard van der Hoff | 2016-07-22 | 1 | -4/+12 |
| | | | | | | | | user_ips is kinda big, so really we want to add the index in the background once we're running. Replace the schema delta with one which will do that. I've done this in a way that's reasonably easy to reuse as there a few other indexes I need, and I don't suppose they will be the last. | ||||
* | storage/client_ips: remove some dead code | Richard van der Hoff | 2016-07-21 | 1 | -3/+0 |
| | |||||
* | Merge branch 'develop' into rav/get_devices_api | Richard van der Hoff | 2016-07-20 | 1 | -1/+2 |
|\ | | | | | | | (pick up PR #938 in the hope of fixing the UTs) | ||||
| * | Record device_id in client_ips | Richard van der Hoff | 2016-07-20 | 1 | -1/+2 |
| | | | | | | | | | | Record the device_id when we add a client ip; it's somewhat redundant as we could get it via the access_token, but it will make querying rather easier. | ||||
* | | GET /devices endpoint | Richard van der Hoff | 2016-07-20 | 1 | -0/+72 |
|/ | | | | | | | implement a GET /devices endpoint which lists all of the user's devices. It also returns the last IP where we saw that device, so there is some dancing to fish that out of the user_ips table. | ||||
* | Move insert_client_ip to a separate class | Mark Haines | 2016-06-03 | 1 | -0/+68 |