Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -2/+1 |
| | |||||
* | Add experimental option to reduce extremities. | Erik Johnston | 2019-06-18 | 1 | -0/+29 |
| | | | | | | | Adds new config option `cleanup_extremities_with_dummy_events` which periodically sends dummy events to rooms with more than 10 extremities. THIS IS REALLY EXPERIMENTAL. | ||||
* | Expose DataStore._get_events as get_events_as_list | Erik Johnston | 2019-05-14 | 1 | -3/+3 |
| | | | | This is in preparation for reaction work which requires it. | ||||
* | Run black on the rest of the storage module (#4996) | Amber Brown | 2019-04-03 | 1 | -89/+60 |
| | |||||
* | s/get_forward_events/get_successor_events/ | Erik Johnston | 2019-03-04 | 1 | -2/+2 |
| | |||||
* | Stop backpaginating when events not visible | Erik Johnston | 2019-02-20 | 1 | -0/+22 |
| | |||||
* | Refactor event building into EventBuilder | Erik Johnston | 2019-01-29 | 1 | -0/+23 |
| | | | | | This is so that everything is done in one place, making it easier to change the event format based on room version | ||||
* | Add helpers for getting prev and auth events (#4139) | Erik Johnston | 2018-11-06 | 1 | -2/+2 |
| | | | | | | | * Add helpers for getting prev and auth events This is in preparation for allowing the event format to change between room versions. | ||||
* | Fix incorrect truncation in get_missing_events | Richard van der Hoff | 2018-10-16 | 1 | -22/+16 |
| | | | | | | | | | It's quite important that get_missing_events returns the *latest* events in the room; however we were pulling event ids out of the database until we got *at least* 10, and then taking the *earliest* of the results. We also shouldn't really be relying on depth, and should be checking the room_id. | ||||
* | Merge branch 'master' into develop | Richard van der Hoff | 2018-08-02 | 1 | -0/+1 |
|\ | |||||
| * | Avoid extra db lookups | Richard van der Hoff | 2018-08-02 | 1 | -29/+1 |
| | | | | | | | | | | Since we're about to look up the events themselves anyway, we can skip the extra db queries here. | ||||
| * | Validation for events/rooms in fed requests | Richard van der Hoff | 2018-08-02 | 1 | -0/+29 |
| | | | | | | | | | | | | | | When we get a federation request which refers to an event id, make sure that said event is in the room the caller claims it is in. (patch supplied by @turt2live) | ||||
* | | Merge pull request #3612 from matrix-org/rav/store_heirarchy | Richard van der Hoff | 2018-07-31 | 1 | -1/+1 |
|\ \ | | | | | | | Make EventStore inherit from EventFederationStore | ||||
| * | | Make EventStore inherit from EventFederationStore | Richard van der Hoff | 2018-07-26 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | (since it uses methods therein) Turns out that we had a bunch of things which were incorrectly importing EventWorkerStore from events.py rather than events_worker.py, which broke once I removed the import into events.py. | ||||
* | | | Merge pull request #3613 from matrix-org/rav/stop_using_event_edges_room_id | Richard van der Hoff | 2018-07-26 | 1 | -7/+6 |
|\ \ \ | | | | | | | | | Remove some redundant joins on event_edges.room_id | ||||
| * | | | Remove some redundant joins on event_edges.room_id | Richard van der Hoff | 2018-07-26 | 1 | -7/+6 |
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've long passed the point where it's possible to have the same event_id in different tables, so these join conditions are redundant: we can just join on event_id. event_edges is of non-trivial size, and the room_id column is wasteful, so let's stop reading from it. In future, we can stop writing to it, and then drop it. | ||||
* / / | 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. | ||||
* / | Wrap a number of things that run in the background | Richard van der Hoff | 2018-07-25 | 1 | -3/+6 |
|/ | | | | | This will reduce the number of "Starting db connection from sentinel context" warnings, and will help with our metrics. | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -9/+7 |
| | |||||
* | Merge pull request #3110 from NotAFile/py3-six-queue | Richard van der Hoff | 2018-04-20 | 1 | -2/+4 |
|\ | | | | | Replace Queue with six.moves.queue | ||||
| * | Replace Queue with six.moves.queue | Adrian Tschira | 2018-04-16 | 1 | -2/+4 |
| | | | | | | | | | | | | and a six.range change which I missed the last time Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | | Avoid creating events with huge numbers of prev_events | Richard van der Hoff | 2018-04-16 | 1 | -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. | ||||
* | Split out SignatureStore and EventFederationStore | Erik Johnston | 2018-03-01 | 1 | -129/+135 |
| | |||||
* | 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) | ||||
* | Add background task to clear out old event_auth | Erik Johnston | 2017-05-24 | 1 | -0/+56 |
| | |||||
* | Only store event_auth for state events | Erik Johnston | 2017-05-24 | 1 | -6/+29 |
| | |||||
* | Use txn.fetchall() so we can reuse txn | Erik Johnston | 2017-03-30 | 1 | -1/+1 |
| | |||||
* | User Cursor.__iter__ instead of fetchall | Erik Johnston | 2017-03-23 | 1 | -7/+6 |
| | | | | This prevents unnecessary construction of lists | ||||
* | Refactoring and cleanups | Richard van der Hoff | 2017-03-17 | 1 | -12/+12 |
| | | | | | | | | | | | | A few non-functional changes: * A bunch of docstrings to document types * Split `EventsStore._persist_events_txn` up a bit. Hopefully it's a bit more readable. * Rephrase `EventFederationStore._update_min_depth_for_room_txn` to avoid mind-bending conditional. * Rephrase rejected/outlier conditional in `_update_outliers_txn` to avoid mind-bending conditional. | ||||
* | Fix bugs in the /keys/changes api | Richard van der Hoff | 2017-02-14 | 1 | -1/+16 |
| | | | | | | | | | | | | | | | * `get_forward_extremeties_for_room` takes a numeric `stream_ordering`. We were passing a `RoomStreamToken`, which meant that it returned the *current* extremities, rather than those corresponding to the `from_token`. However: * `get_state_ids_for_events` required a second ('types') parameter; this meant that a `TypeError` was thrown and we ended up acting as though there was *no* prev state. * `get_state_ids_for_events` actually returns a map from event_id to state dictionary - just looking up the state keys in it again meant that we acted as though there was no prev state. We now check if each member's state has changed since *any* of the extremities. Also add/fix some comments. | ||||
* | Up get_latest_event_ids_in_room cache | Erik Johnston | 2017-02-01 | 1 | -1/+1 |
| | |||||
* | Calculate the forward extremeties once | Erik Johnston | 2017-01-20 | 1 | -70/+6 |
| | |||||
* | Remove spurious AS clause | Erik Johnston | 2016-09-21 | 1 | -1/+1 |
| | |||||
* | Fix _delete_old_forward_extrem_cache query | Erik Johnston | 2016-09-21 | 1 | -5/+4 |
| | |||||
* | Comment | Erik Johnston | 2016-09-16 | 1 | -0/+2 |
| | |||||
* | Filter remote rooms lists locally | Erik Johnston | 2016-09-16 | 1 | -1/+1 |
| | |||||
* | Handling expiring stream extrems correctly. | Erik Johnston | 2016-09-15 | 1 | -3/+20 |
| | |||||
* | Change get_pos_of_last_change to return upper bound | Erik Johnston | 2016-09-15 | 1 | -3/+2 |
| | |||||
* | Use stream_change cache to make get_forward_extremeties_for_room cache more ↵ | Erik Johnston | 2016-09-15 | 1 | -1/+10 |
| | | | | effective | ||||
* | Add cache to get_forward_extremeties_for_room | Erik Johnston | 2016-09-15 | 1 | -0/+1 |
| | |||||
* | Add a room visibility stream | Erik Johnston | 2016-09-14 | 1 | -1/+1 |
| | |||||
* | Add a DB index to figure out past state at a stream ordering in a room | Erik Johnston | 2016-09-14 | 1 | -0/+81 |
| | |||||
* | Use computed prev event ids | Erik Johnston | 2016-04-01 | 1 | -0/+16 |
| | |||||
* | Respond to federated invite with non-empty context | Daniel Wagner-Hall | 2016-02-17 | 1 | -4/+4 |
| | | | | | | | Currently, we magically perform an extra database hit to find the inviter, and use this to guess where we should send the event. Instead, fill in a valid context, so that other callers relying on the context actually have one. | ||||
* | Fix flake8 warnings for new flake8 | Daniel Wagner-Hall | 2016-02-02 | 1 | -1/+1 |
| | |||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Remove unused functions from synapse/storage/event_federation.py | Mark Haines | 2015-09-23 | 1 | -71/+0 |
| | |||||
* | synapse/storage/event_federation.py:_get_auth_events is unused | Mark Haines | 2015-09-22 | 1 | -21/+0 |
| | |||||
* | Merge pull request #281 from matrix-org/erikj/update_extremeties | Erik Johnston | 2015-09-15 | 1 | -0/+9 |
|\ | | | | | When updating a stored event from outlier to non-outlier, remember to update the extremeties | ||||
| * | "Comments" | Erik Johnston | 2015-09-15 | 1 | -0/+6 |
| | | |||||
| * | When updating a stored event from outlier to non-outlier, remember to update ↵ | Erik Johnston | 2015-09-15 | 1 | -0/+3 |
| | | | | | | | | the extremeties | ||||
* | | Merge branch 'release-v0.10.0' into develop | Mark Haines | 2015-08-28 | 1 | -2/+8 |
|\| | | | | | | | | | | | | | Conflicts: synapse/handlers/auth.py synapse/python_dependencies.py synapse/rest/client/v1/login.py | ||||
| * | Don't insert events into 'event_*_extremeties' tables if they're outliers | Erik Johnston | 2015-08-23 | 1 | -2/+8 |
| | | |||||
* | | Remove syutil dependency in favour of smaller single-purpose libraries | Mark Haines | 2015-08-24 | 1 | -1/+1 |
|/ | |||||
* | Move all the caches into their own package, synapse.util.caches | Erik Johnston | 2015-08-11 | 1 | -1/+2 |
| | |||||
* | Change Cache to not use *args in its interface | Erik Johnston | 2015-08-07 | 1 | -2/+2 |
| | |||||
* | Merge pull request #193 from matrix-org/erikj/bulk_persist_event | Erik Johnston | 2015-07-14 | 1 | -51/+57 |
|\ | | | | | Add bulk insert events API | ||||
| * | Add bulk insert events API | Erik Johnston | 2015-06-25 | 1 | -51/+57 |
| | | |||||
* | | Don't explode if we don't recognize one of the event_ids in the backfill request | Erik Johnston | 2015-07-06 | 1 | -2/+4 |
|/ | |||||
* | Batch SELECTs in _get_auth_chain_ids_txn | Erik Johnston | 2015-06-23 | 1 | -3/+11 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2015-05-22 | 1 | -0/+1 |
|\ | | | | | | | erikj/backfill_fixes | ||||
| * | Merge pull request #156 from matrix-org/erikj/join_perf | Mark Haines | 2015-05-22 | 1 | -2/+3 |
| |\ | | | | | | | Make joining #matrix:matrix.org over federation quicker | ||||
| * | | Invalidate the get_latest_event_ids_in_room cache when deleting from ↵ | Mark Haines | 2015-05-22 | 1 | -0/+1 |
| | | | | | | | | | | | | event_forward_extremities | ||||
* | | | Actually return something from lambda | Erik Johnston | 2015-05-21 | 1 | -1/+1 |
| | | | |||||
* | | | Sort backfill events | Erik Johnston | 2015-05-21 | 1 | -1/+5 |
| | | | |||||
* | | | Remove dead code | Erik Johnston | 2015-05-21 | 1 | -5/+0 |
| | | | |||||
* | | | Only get non-state | Erik Johnston | 2015-05-21 | 1 | -1/+2 |
| | | | |||||
* | | | Skip events we've already seen | Erik Johnston | 2015-05-21 | 1 | -0/+3 |
| | | | |||||
* | | | Correctly prepopulate queue | Erik Johnston | 2015-05-21 | 1 | -2/+10 |
| | | | |||||
* | | | Don't prepopulate event_results | Erik Johnston | 2015-05-21 | 1 | -1/+1 |
| | | | |||||
* | | | Don't readd things that are already in event_results | Erik Johnston | 2015-05-21 | 1 | -1/+2 |
| | | | |||||
* | | | PriorityQueue gives lowest first | Erik Johnston | 2015-05-21 | 1 | -2/+2 |
| | | | |||||
* | | | Correctly capture Queue.Empty exception | Erik Johnston | 2015-05-21 | 1 | -2/+5 |
| | | | |||||
* | | | Merge branch 'erikj/join_perf' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2015-05-21 | 1 | -21/+17 |
|\ \ \ | | |/ | |/| | | | | erikj/backfill_fixes | ||||
| * | | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/join_perf | Erik Johnston | 2015-05-21 | 1 | -21/+17 |
| |\| | |||||
| | * | Move fetching of events into their own transactions | Erik Johnston | 2015-05-14 | 1 | -21/+17 |
| | | | |||||
* | | | Fix _get_backfill_events to return events in the correct order | Erik Johnston | 2015-05-20 | 1 | -27/+28 |
| | | | |||||
* | | | Ensure event_results is a set | Erik Johnston | 2015-05-19 | 1 | -1/+1 |
|/ / | |||||
* / | Fix event_backwards_extrem insertion to ignore outliers | Erik Johnston | 2015-05-19 | 1 | -2/+3 |
|/ | |||||
* | Err, delete the right stuff | Erik Johnston | 2015-05-12 | 1 | -4/+5 |
| | |||||
* | Newlines | Erik Johnston | 2015-05-12 | 1 | -2/+0 |
| | |||||
* | We do actually want to delete rows out of event_backward_extremities | Erik Johnston | 2015-05-12 | 1 | -4/+11 |
| | |||||
* | Fix up _handle_prev_events to not try to insert duplicate rows | Erik Johnston | 2015-05-12 | 1 | -23/+13 |
| | |||||
* | Initial hack at wiring together pagination and backfill | Erik Johnston | 2015-05-11 | 1 | -2/+26 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/executemany | Erik Johnston | 2015-05-05 | 1 | -1/+3 |
|\ | |||||
| * | Collect the invalidate callbacks on the transaction object rather than ↵ | Mark Haines | 2015-05-05 | 1 | -5/+5 |
| | | | | | | | | passing around a separate list | ||||
| * | Invalidate the caches from the correct thread | Mark Haines | 2015-05-05 | 1 | -4/+6 |
| | | |||||
* | | Fix indentation | Erik Johnston | 2015-05-05 | 1 | -10/+10 |
| | | |||||
* | | Add support for using executemany | Erik Johnston | 2015-05-05 | 1 | -19/+21 |
|/ | |||||
* | Correctly name transaction | Erik Johnston | 2015-05-05 | 1 | -1/+1 |
| | |||||
* | Cache latest_event_ids_in_room | Erik Johnston | 2015-05-01 | 1 | -1/+4 |
| | |||||
* | Split a storage function in two so that we don't have to do extra work. | Erik Johnston | 2015-05-01 | 1 | -0/+11 |
| | |||||
* | Add support for postgres instead of mysql. Change sql accourdingly. blob + ↵ | Erik Johnston | 2015-04-14 | 1 | -5/+5 |
| | | | | varbinary -> bytea. No support for UNSIGNED or CREATE INDEX IF NOT EXISTS. | ||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into mysql | Erik Johnston | 2015-03-20 | 1 | -0/+12 |
|\ | |||||
| * | Clean out event_forward_extremities table when the server rejoins the room | Erik Johnston | 2015-03-18 | 1 | -0/+12 |
| | | |||||
* | | Convert storage layer to be mysql compatible | Erik Johnston | 2015-03-19 | 1 | -14/+11 |
|/ | |||||
* | Revert get_auth_chain changes | Erik Johnston | 2015-02-23 | 1 | -7/+5 |
| | |||||
* | Initial stab at implementing a batched get_missing_pdus request | Erik Johnston | 2015-02-19 | 1 | -5/+58 |
| | |||||
* | Get an auth query one at a time | Erik Johnston | 2015-02-12 | 1 | -7/+6 |
| | |||||
* | Update copyright notices | Mark Haines | 2015-01-06 | 1 | -1/+1 |
| | |||||
* | Use _get_events_txn instead of _parse_events_txn | Erik Johnston | 2014-12-16 | 1 | -7/+1 |
| | |||||
* | Merge branch 'hotfixes-v0.5.4a' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2014-12-16 | 1 | -8/+8 |
|\ | | | | | | | release-v0.6.0 | ||||
| * | Fix bug where we did not send the full auth chain to people that joined over ↵ | Erik Johnston | 2014-12-16 | 1 | -8/+8 |
| | | | | | | | | federation | ||||
* | | Fix bug where we ignored event_edge_hashes table | Erik Johnston | 2014-12-15 | 1 | -5/+6 |
|/ | |||||
* | Update some of the docs in event_federation | Erik Johnston | 2014-11-12 | 1 | -11/+20 |
| | |||||
* | PEP8 | Erik Johnston | 2014-11-10 | 1 | -6/+3 |
| | |||||
* | Fix backfill to work. Add auth to backfill request | Erik Johnston | 2014-11-10 | 1 | -2/+2 |
| | |||||
* | Add '/event_auth/' federation api | Erik Johnston | 2014-11-07 | 1 | -7/+19 |
| | |||||
* | Fix bug in _get_auth_chain_txn | Erik Johnston | 2014-11-07 | 1 | -14/+11 |
| | |||||
* | Implement method to get auth_chain from a given event_id | Erik Johnston | 2014-11-07 | 1 | -0/+35 |
| | |||||
* | Start implementing auth chains | Erik Johnston | 2014-11-07 | 1 | -0/+21 |
| | |||||
* | Implement new replace_state and changed prev_state | Erik Johnston | 2014-11-06 | 1 | -7/+57 |
| | | | | | `prev_state` is now a list of previous state ids, similiar to prev_events. `replace_state` now points to what we think was replaced. | ||||
* | Get correct prev_events | Erik Johnston | 2014-11-05 | 1 | -9/+21 |
| | |||||
* | Make prev_event signing work again. | Erik Johnston | 2014-10-31 | 1 | -1/+1 |
| | |||||
* | Actually don't store any PDUs | Erik Johnston | 2014-10-31 | 1 | -0/+7 |
| | |||||
* | Move the impl of backfill to use events. | Erik Johnston | 2014-10-31 | 1 | -1/+85 |
| | |||||
* | Fix SQL so that accepts we may want to persist events twice. | Erik Johnston | 2014-10-30 | 1 | -3/+5 |
| | |||||
* | Start filling out and using new events tables | Erik Johnston | 2014-10-29 | 1 | -16/+33 |
| | |||||
* | Don't reference PDU when persisting event | Erik Johnston | 2014-10-28 | 1 | -2/+2 |
| | |||||
* | Begin implementing all the PDU storage stuff in Events land | Erik Johnston | 2014-10-28 | 1 | -0/+143 |