summary refs log tree commit diff
path: root/synapse/storage/receipts.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug where read-receipts lost their timestamps (#4927)Richard van der Hoff2019-03-251-1/+3
| | | | | Make sure that they are sent correctly over the replication stream. Fixes: #4898
* Add some debug about processing read receipts.Richard van der Hoff2019-03-041-6/+20
| | | | | I'm hoping to establish which rooms are having lots of RRs sent for them, and how old the events are when they are sent.
* Update return value docstringErik Johnston2018-07-121-1/+1
|
* Use 'is not None' and add commentsErik Johnston2018-07-101-2/+6
|
* Use stream cache in get_linearized_receipts_for_roomErik Johnston2018-07-101-4/+13
| | | | | This avoids us from uncessarily hitting the database when there has been no change for the room
* run isortAmber Brown2018-07-091-8/+8
|
* Attempt to be more performant on PyPy (#3462)Amber Brown2018-06-281-1/+2
|
* Handle RRs which arrive before their eventsRichard van der Hoff2018-06-011-25/+19
|
* Ignore depth when updating read-receiptsRichard van der Hoff2018-06-011-30/+37
| | | | Order read receipts by stream ordering instead of depth
* 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
* Use stream rather depth ordering for push actionsErik Johnston2018-05-111-1/+0
| | | | | | 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 branch 'master' of github.com:matrix-org/synapse into developErik Johnston2018-03-191-1/+1
|\
| * Replace ujson with simplejsonErik Johnston2018-03-151-1/+1
| |
* | Fix missing invalidations for receipt storageErik Johnston2018-02-211-14/+14
| |
* | 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-201-45/+64
|/
* Make __init__ consitstent across Store heirarchyRichard van der Hoff2017-11-131-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)
* Fix invalidation of get_users_with_read_receipts_in_roomErik Johnston2017-05-191-1/+3
|
* Reduce cache size by not storing deferredsErik Johnston2017-04-251-4/+7
| | | | | | | | | | | | | | | | | | | | Currently the cache descriptors store deferreds rather than raw values, this is a simple way of triggering only one database hit and sharing the result if two callers attempt to get the same value. However, there are a few caches that simply store a mapping from string to string (or int). These caches can have a large number of entries, under the assumption that each entry is small. However, the size of a deferred (specifically the size of ObservableDeferred) is signigicantly larger than that of the raw value, 2kb vs 32b. This PR therefore changes the cache descriptors to store the raw values rather than the deferreds. As a side effect cached storage function now either return a deferred or the actual value, as the cached list decriptor already does. This is fine as we always end up just yield'ing on the returned value eventually, which handles that case correctly.
* User Cursor.__iter__ instead of fetchallErik Johnston2017-03-231-3/+2
| | | | This prevents unnecessary construction of lists
* Aggregate event push actionsErik Johnston2017-02-141-0/+1
|
* Fix result of insert_receiptRichard van der Hoff2016-12-081-1/+1
| | | | This should fix the absence of notifications when new receipts arrive.
* Lower get_linearized_receipts_for_room cache sizeErik Johnston2016-08-311-1/+1
|
* Merge branch 'develop' into dbkr/notifications_apiMatthew Hodgson2016-08-201-1/+1
|\
| * Remove lru optionErik Johnston2016-08-191-1/+1
| |
* | Explicit joinDavid Baker2016-08-181-2/+2
| |
* | Merge remote-tracking branch 'origin/develop' into dbkr/notifications_apiDavid Baker2016-08-111-0/+28
|\|
| * Merge pull request #809 from matrix-org/erikj/cache_receipts_in_roomErik Johnston2016-06-031-0/+28
| |\ | | | | | | Add get_users_with_read_receipts_in_room cache
| | * Add get_users_with_read_receipts_in_room cacheErik Johnston2016-06-011-0/+28
| | |
* | | Add GET /notifications APIDavid Baker2016-05-231-0/+25
|/ /
* / Only delete push actions after 30 daysDavid Baker2016-05-201-1/+1
|/
* Allow receipts for events we haven't seen in the dbMark Haines2016-05-131-4/+6
|
* Merge pull request #769 from matrix-org/erikj/push_actions_deleteErik Johnston2016-05-131-9/+17
|\ | | | | Delete old pushers
| * Delete old pushersErik Johnston2016-05-031-9/+17
| |
* | Use tree cache for get_linearized_receipts_for_roomErik Johnston2016-05-131-3/+3
|/
* Check that somethign has happend before running the selectsMark Haines2016-04-271-0/+3
|
* Merge remote-tracking branch 'origin/develop' into ↵David Baker2016-04-071-2/+2
|\ | | | | | | dbkr/pushers_use_event_actions
| * Make the cache objects be per instance rather than being globalMark Haines2016-04-061-2/+2
| |
* | Send badge count pushes.David Baker2016-04-071-3/+6
|/ | | | Also fix bugs with retrying.
* Use a stream id generator for backfilled idsMark Haines2016-04-011-3/+3
|
* Intern all the thingsErik Johnston2016-03-231-11/+10
|
* Merge pull request #489 from matrix-org/markjh/replicationMark Haines2016-03-011-0/+16
|\ | | | | Add a /replication API for extracting the updates that happened on synapse.
| * Add a /replication API for extracting the updates that happened onMark Haines2016-03-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | synapse This is necessary for replicating the data in synapse to be visible to a separate service because presence and typing notifications aren't stored in a database so won't be visible to another process. This API can be used to either get the raw data by requesting the tables themselves or to just receive notifications for updates by following the streams meta-stream. Returns updates for each table requested a JSON array of arrays with a row for each row in the table. Each table is prefixed by a header row with the: name of the table, current stream_id position for the table, number of rows, number of columns and the names of the columns. This is followed by the rows that have been added to the server since the requester last asked. The API has a timeout and is hooked up to the notifier so that a slave can long poll for updates.
* | Load the current id in the IdGenerator constructorMark Haines2016-03-011-2/+2
|/ | | | | | | | | Rather than loading them lazily. This allows us to remove all the yield statements and spurious arguments for the get_next methods. It also allows us to replace all instances of get_next_txn with get_next since get_next no longer needs to access the db.
* Remove unused param from get_max_tokenErik Johnston2016-02-181-3/+3
|
* Invalidate get_last_receipt_event_id_for_user cacheErik Johnston2016-02-091-0/+5
|
* Don't load all ephemeral state for a room on every syncErik Johnston2016-02-091-0/+14
|
* Cache tags and account dataErik Johnston2016-01-281-4/+4
|
* Invalidate caches properly. Remove unused argErik Johnston2016-01-281-4/+6
|
* PEP8Erik Johnston2016-01-271-2/+0
|
* Add cache to room streamErik Johnston2016-01-271-62/+3
|
* Add a Homeserver.setup method.Erik Johnston2016-01-261-3/+5
| | | | | | This is for setting up dependencies that require work on startup. This is useful for the DataStore that wants to read a bunch from the database before initiliazing.
* peppateDavid Baker2016-01-201-3/+2
|
* Add storage function to get all receipts for a user. Also add some cache ↵David Baker2016-01-201-21/+34
| | | | invalidation to the receipts storage because there wasn't any, and remove a method that was unused.
* Add regex cache. Only caculate push actions for users that have sent read ↵Erik Johnston2016-01-191-1/+13
| | | | receipts, and are on that server
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Rename unhelpful variable nameErik Johnston2015-08-181-7/+2
|
* CommentsErik Johnston2015-08-181-4/+14
|
* Remove unused importErik Johnston2015-08-171-2/+0
|
* Batch _get_linearized_receipts_for_roomsErik Johnston2015-08-141-15/+64
|
* Add metrics to the receipts cacheErik Johnston2015-08-131-0/+6
|
* Move all the caches into their own package, synapse.util.cachesErik Johnston2015-08-111-1/+2
|
* Add support for using keyword arguments with cached functionsErik Johnston2015-07-271-3/+2
|
* Up default cache size for _RoomStreamChangeCacheMatrix2015-07-181-1/+1
|
* DocsErik Johnston2015-07-141-3/+28
|
* CommentsErik Johnston2015-07-131-0/+11
|
* Handle error slightly betterErik Johnston2015-07-091-2/+2
|
* Change format of receipts to allow inclusion of dataErik Johnston2015-07-091-19/+20
|
* Add a cache to fetching of receipt streamsErik Johnston2015-07-081-3/+89
|
* Hook up receipts to v1 initialSyncErik Johnston2015-07-081-9/+20
|
* Wire together receipts and the notifer/federationErik Johnston2015-07-071-9/+60
|
* Fix various typosErik Johnston2015-07-071-6/+7
|
* Add basic storage functions for handling of receiptsErik Johnston2015-07-011-0/+162