Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Consistently use six's iteritems and wrap lazy keys/values in list() if ↵ | Amber Brown | 2018-05-31 | 1 | -22/+25 |
| | | | | they're not meant to be lazy (#3307) | ||||
* | cleanup | Amber Brown | 2018-05-22 | 1 | -3/+6 |
| | |||||
* | Merge remote-tracking branch 'origin/develop' into 3218-official-prom | Amber Brown | 2018-05-22 | 1 | -24/+53 |
|\ | |||||
| * | Clarify comment | Erik Johnston | 2018-05-16 | 1 | -1/+2 |
| | | |||||
| * | Comments | Erik Johnston | 2018-05-16 | 1 | -0/+8 |
| | | |||||
| * | Move and rename variable | Erik Johnston | 2018-05-16 | 1 | -3/+3 |
| | | |||||
| * | Make purge_history operate on tokens | Erik Johnston | 2018-05-15 | 1 | -8/+9 |
| | | | | | | | | As we're soon going to change how topological_ordering works | ||||
| * | Use events_to_purge table rather than token | Erik Johnston | 2018-05-15 | 1 | -15/+34 |
| | | |||||
* | | rest of the changes | Amber Brown | 2018-05-21 | 1 | -17/+11 |
|/ | |||||
* | Fix up grammar | Erik Johnston | 2018-05-03 | 1 | -3/+3 |
| | |||||
* | Refactor event storage to not require state | Erik Johnston | 2018-04-27 | 1 | -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. | ||||
* | Refactor store.have_events | Richard van der Hoff | 2018-04-20 | 1 | -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. | ||||
* | Track where event stream processing have gotten up to | Erik Johnston | 2018-04-11 | 1 | -0/+3 |
| | |||||
* | Use static JSONEncoders | Richard van der Hoff | 2018-03-29 | 1 | -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. | ||||
* | Comment | Erik Johnston | 2018-03-27 | 1 | -4/+5 |
| | |||||
* | Fix indent | Erik Johnston | 2018-03-27 | 1 | -1/+1 |
| | |||||
* | Comment | Erik Johnston | 2018-03-27 | 1 | -0/+7 |
| | |||||
* | Add counter metrics for calculating state delta | Erik Johnston | 2018-03-27 | 1 | -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 develop | Erik Johnston | 2018-03-19 | 1 | -1/+0 |
|\ | |||||
| * | Remove wrong comment | Erik Johnston | 2018-03-16 | 1 | -1/+0 |
| | | |||||
| * | Replace ujson with simplejson | Erik Johnston | 2018-03-15 | 1 | -2/+2 |
| | | |||||
* | | Replace some ujson with simplejson to make it work | Erik Johnston | 2018-03-16 | 1 | -1/+1 |
| | | |||||
* | | Add Measure block for persist_events | Richard van der Hoff | 2018-03-13 | 1 | -4/+5 |
| | | | | | | | | This seems like a useful thing to measure. | ||||
* | | Fix race in sync when joining room | Erik Johnston | 2018-03-07 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | | Add some caches to help read marker API | Erik Johnston | 2018-03-01 | 1 | -2/+2 |
| | | |||||
* | | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2018-02-26 | 1 | -359/+7 |
|\ \ | | | | | | | | | | erikj/handle_unpersisted_events_push | ||||
| * | | Split EventsWorkerStore into separate file | Erik Johnston | 2018-02-23 | 1 | -360/+5 |
| | | | |||||
| * | | Update copyright | Erik Johnston | 2018-02-23 | 1 | -0/+1 |
| | | | |||||
| * | | Remove redundant clock | Erik Johnston | 2018-02-23 | 1 | -3/+0 |
| | | | |||||
| * | | _event_persist_queue shouldn't be in worker store | Erik Johnston | 2018-02-23 | 1 | -4/+4 |
| | | | |||||
| * | | Split out get_events and co into a worker store | Erik Johnston | 2018-02-21 | 1 | -345/+350 |
| | | | |||||
* | | | Ensure all push actions are deleted from staging | Erik Johnston | 2018-02-20 | 1 | -1/+10 |
| | | | |||||
* | | | Refactor _set_push_actions_for_event_and_users_txn to use events_and_contexts | Erik Johnston | 2018-02-20 | 1 | -5/+6 |
|/ / | |||||
* | | (Really) fix tablescan of event_push_actions on purge | Richard van der Hoff | 2018-02-16 | 1 | -1/+0 |
| | | | | | | | | | | commit 278d21b5 added new code to avoid the tablescan, but didn't remove the old :/ | ||||
* | | Remove context.push_actions | Erik Johnston | 2018-02-15 | 1 | -4/+3 |
| | | |||||
* | | Update event_push_actions table from staging table | Erik Johnston | 2018-02-15 | 1 | -1/+1 |
| | | |||||
* | | purge_history: fix sqlite syntax error | Richard van der Hoff | 2018-02-14 | 1 | -1/+4 |
| | | | | | | | | apparently sqlite insists on indexes being named | ||||
* | | purge_history: handle sqlite asshattery | Richard van der Hoff | 2018-02-14 | 1 | -19/+27 |
| | | | | | | | | | | apparently creating a temporary table commits the transaction. because that's a useful thing. | ||||
* | | purge_history: fix index use | Richard van der Hoff | 2018-02-14 | 1 | -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 table | Richard van der Hoff | 2018-02-14 | 1 | -35/+58 |
| | | | | | | | | | | ... which should speed things up by reducing the amount of data being shuffled across the connection | ||||
* | | Fix log message in purge_history | Richard van der Hoff | 2018-02-13 | 1 | -2/+1 |
| | | | | | | | | (we don't just remove remote events) | ||||
* | | Merge pull request #2864 from matrix-org/rav/persist_event_caching | Richard van der Hoff | 2018-02-13 | 1 | -56/+40 |
|\ \ | | | | | | | Use StateResolutionHandler to resolve state in persist_events | ||||
| * | | style nit | Richard van der Hoff | 2018-02-13 | 1 | -1/+1 |
| | | | |||||
| * | | Use StateResolutionHandler to resolve state in persist events | Richard van der Hoff | 2018-02-05 | 1 | -48/+24 |
| | | | | | | | | | | | | ... and thus benefit (hopefully) from its cache. | ||||
| * | | Flatten _get_new_state_after_events | Richard van der Hoff | 2018-02-05 | 1 | -44/+46 |
| | | | | | | | | | | | | rejig the if statements to simplify the logic and reduce indentation | ||||
| * | | Check that events being persisted have state_group | Richard van der Hoff | 2018-02-05 | 1 | -4/+9 |
| | | | |||||
| * | | Add event_map param to resolve_state_groups | Richard van der Hoff | 2018-02-05 | 1 | -0/+1 |
| | | | |||||
* | | | Merge pull request #2858 from matrix-org/rav/purge_updates | Richard van der Hoff | 2018-02-09 | 1 | -33/+61 |
|\ \ \ | | | | | | | | | delete_local_events for purge_room_history | ||||
| * | | | purge: move room_depth update to end | Richard van der Hoff | 2018-02-09 | 1 | -6/+12 |
| | | | | | | | | | | | | | | | | ... to avoid locking the table for too long | ||||
| * | | | delete_local_events for purge_history | Richard van der Hoff | 2018-02-09 | 1 | -7/+28 |
| | | | | | | | | | | | | | | | | Add a flag which makes the purger delete local events | ||||
| * | | | purge: Move cache invalidation to more appropriate place | Richard van der Hoff | 2018-02-09 | 1 | -4/+4 |
| | | | | | | | | | | | | | | | | it was a bit of a non-sequitur there | ||||
| * | | | bump purge logging to info | Richard van der Hoff | 2018-02-09 | 1 | -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_history | Richard van der Hoff | 2018-02-09 | 1 | -7/+7 |
| | | | | | | | | | | | | | | | | (beacause it deletes more than state) | ||||
* | | | | Store state groups separately from events (#2784) | Erik Johnston | 2018-02-06 | 1 | -6/+4 |
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 | ||||
* | | | Remove redundant return value from _calculate_state_delta | Richard van der Hoff | 2018-02-05 | 1 | -10/+23 |
| | | | | | | | | | | | | | | | we already have the state from _get_new_state_after_events, so returning it from _calculate_state_delta is just confusing. | ||||
* | | | factor _get_new_state_after_events out of _calculate_state_delta | Richard van der Hoff | 2018-01-31 | 1 | -18/+39 |
| | | | | | | | | | | | | This reduces the scope of a bunch of variables | ||||
* | | | Improve exception handling in persist_event | Richard van der Hoff | 2018-01-29 | 1 | -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 | ||||
* | | Merge pull request #2805 from matrix-org/rav/log_state_res | Richard van der Hoff | 2018-01-17 | 1 | -0/+6 |
|\ \ | | | | | | | Log room when doing state resolution | ||||
| * | | Log room when doing state resolution | Richard van der Hoff | 2018-01-17 | 1 | -0/+6 |
| |/ | | | | | | | Mostly because it helps figure out what is prompting the resolution | ||||
* | | Split resolve_events into two functions | Richard van der Hoff | 2018-01-17 | 1 | -2/+2 |
| | | | | | | | | ... so that the return type doesn't depend on the arg types | ||||
* | | Fix a logcontext leak in persist_events | Richard van der Hoff | 2018-01-16 | 1 | -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) | ||||
* | 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) | ||||
* | replace 'except:' with 'except Exception:' | Richard van der Hoff | 2017-10-23 | 1 | -1/+1 |
| | | | | what could possibly go wrong | ||||
* | Fix logcontext handling for persist_events | Richard van der Hoff | 2017-10-17 | 1 | -7/+17 |
| | | | | | | | | * don't use preserve_context_over_deferred, which is known broken. * remove a redundant preserve_fn. * add/improve some comments | ||||
* | Invalidate cache | Erik Johnston | 2017-10-03 | 1 | -0/+3 |
| | |||||
* | Make into list | Erik Johnston | 2017-06-29 | 1 | -1/+1 |
| | |||||
* | Prefill forward extrems and event to state groups | Erik Johnston | 2017-06-29 | 1 | -0/+5 |
| | |||||
* | Merge pull request #2286 from matrix-org/erikj/split_out_user_dir | Erik Johnston | 2017-06-16 | 1 | -0/+18 |
|\ | | | | | Split out user directory to a separate process | ||||
| * | Initial worker impl | Erik Johnston | 2017-06-16 | 1 | -0/+18 |
| | | |||||
* | | Merge pull request #2281 from matrix-org/erikj/phone_home_stats | Erik Johnston | 2017-06-15 | 1 | -58/+43 |
|\ \ | |/ |/| | Fix phone home stats | ||||
| * | Add some more stats | Erik Johnston | 2017-06-15 | 1 | -0/+15 |
| | | |||||
| * | Fix phone home stats | Erik Johnston | 2017-06-14 | 1 | -59/+29 |
| | | |||||
* | | Add cache for is_host_joined | Erik Johnston | 2017-06-13 | 1 | -0/+5 |
| | | |||||
* | | Merge pull request #2259 from matrix-org/erikj/fix_state_woes | Erik Johnston | 2017-06-07 | 1 | -1/+1 |
|\ \ | | | | | | | Fix bug where state_group tables got corrupted | ||||
| * | | Fix bug where state_group tables got corrupted | Erik Johnston | 2017-06-07 | 1 | -1/+1 |
| |/ | | | | | | | | | | | | | | | 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. | ||||
* | | Fix typo | Erik Johnston | 2017-05-31 | 1 | -1/+1 |
| | | |||||
* | | Add stream change cache | Erik Johnston | 2017-05-31 | 1 | -0/+4 |
| | | |||||
* | | Add clobbered event_id | Erik Johnston | 2017-05-30 | 1 | -0/+1 |
| | | |||||
* | | Add current_state_delta_stream table | Erik Johnston | 2017-05-30 | 1 | -8/+23 |
| | | |||||
* | | Only store event_auth for state events | Erik Johnston | 2017-05-24 | 1 | -0/+1 |
|/ | |||||
* | Merge pull request #2224 from matrix-org/erikj/prefill_state | Erik Johnston | 2017-05-16 | 1 | -5/+10 |
|\ | | | | | Prefill state caches | ||||
| * | Remove spurious merge artifacts | Erik Johnston | 2017-05-16 | 1 | -13/+0 |
| | | |||||
| * | Comments | Erik Johnston | 2017-05-15 | 1 | -3/+3 |
| | | |||||
| * | Add more granular event send metrics | Erik Johnston | 2017-05-15 | 1 | -0/+12 |
| | | |||||
| * | Prefill state caches | Erik Johnston | 2017-05-15 | 1 | -2/+8 |
| | | |||||
* | | Don't create event_search index on sqlite | Richard van der Hoff | 2017-05-11 | 1 | -0/+1 |
| | | | | | | | | ... because the table is virtual | ||||
* | | Add more logging for purging | Richard van der Hoff | 2017-05-11 | 1 | -7/+14 |
| | | | | | | | | Log the number of events we will be deleting at info. | ||||
* | | Add an index to event_search | Richard van der Hoff | 2017-05-11 | 1 | -0/+11 |
|/ | | | | - to make the purge API quicker | ||||
* | Tidy purge code and add some comments | Richard van der Hoff | 2017-05-11 | 1 | -12/+19 |
| | | | | Try to make this clearer with more comments and some variable renames | ||||
* | Don't de-delta state groups we're about to delete | Richard van der Hoff | 2017-05-10 | 1 | -11/+9 |
| | |||||
* | add some logging to purge_history | Richard van der Hoff | 2017-05-10 | 1 | -4/+21 |
| | |||||
* | Expand docstring a bit | Erik Johnston | 2017-05-08 | 1 | -1/+7 |
| | |||||
* | Don't update event cache hit ratio from get_joined_users | Erik Johnston | 2017-05-08 | 1 | -2/+11 |
| | | | | | Otherwise the hit ration of plain get_events gets completely skewed by calls to get_joined_users* functions. | ||||
* | Revert "Prefill state caches" | Erik Johnston | 2017-05-04 | 1 | -11/+5 |
| | |||||
* | Comments | Erik Johnston | 2017-05-03 | 1 | -3/+3 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/prefill_state | Erik Johnston | 2017-05-03 | 1 | -0/+18 |
|\ | |||||
| * | Add more granular event send metrics | Erik Johnston | 2017-05-02 | 1 | -0/+16 |
| | | |||||
* | | Prefill state caches | Erik Johnston | 2017-05-02 | 1 | -2/+6 |
|/ | |||||
* | Correct logic in is_event_after | Luke Barnard | 2017-04-13 | 1 | -1/+1 |
| | |||||
* | Simplify is_event_after logic | Luke Barnard | 2017-04-12 | 1 | -10/+3 |
| | |||||
* | travis flake8.. | Luke Barnard | 2017-04-11 | 1 | -0/+1 |
| | |||||
* | Refactor event ordering check to events store | Luke Barnard | 2017-04-11 | 1 | -0/+28 |
| | |||||
* | Add new storage functions for new replication | Erik Johnston | 2017-03-30 | 1 | -0/+88 |
| | | | | | The new replication protocol will keep all the streams separate, rather than muxing multiple streams into one. | ||||
* | Typo | Erik Johnston | 2017-03-27 | 1 | -1/+1 |
| | |||||
* | Short circuit if all new events have same state group | Erik Johnston | 2017-03-27 | 1 | -36/+51 |
| | |||||
* | Use iter(items|values) | Erik Johnston | 2017-03-24 | 1 | -18/+14 |
| | |||||
* | User Cursor.__iter__ instead of fetchall | Erik Johnston | 2017-03-23 | 1 | -1/+1 |
| | | | | This prevents unnecessary construction of lists | ||||
* | Merge pull request #2033 from matrix-org/erikj/repl_speed | Erik Johnston | 2017-03-21 | 1 | -17/+14 |
|\ | | | | | Don't send the full event json over replication | ||||
| * | Don't send the full event json over replication | Erik Johnston | 2017-03-17 | 1 | -17/+14 |
| | | |||||
* | | Avoid resetting state on rejected events | Richard van der Hoff | 2017-03-17 | 1 | -4/+4 |
| | | | | | | | | | | | | | | When we get a rejected event, give it the same state_group as its prev_event, rather than no state_group at all. This should fix https://github.com/matrix-org/synapse/issues/1935. | ||||
* | | Refactoring and cleanups | Richard van der Hoff | 2017-03-17 | 1 | -60/+213 |
|/ | | | | | | | | | | | | 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. | ||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2017-03-14 | 1 | -3/+28 |
|\ | | | | | | | erikj/public_list_speed | ||||
| * | Fix current_state_events table to not lie | Erik Johnston | 2017-03-14 | 1 | -3/+28 |
| | | | | | | | | | | If we try and persist two state events that have the same ancestor we calculate the wrong current state when persisting those events. | ||||
* | | Get current state by using current_state_events table | Erik Johnston | 2017-03-10 | 1 | -10/+8 |
|/ | |||||
* | Remove needless check | Erik Johnston | 2017-02-27 | 1 | -2/+0 |
| | |||||
* | It should be all | Erik Johnston | 2017-02-27 | 1 | -1/+1 |
| | |||||
* | Don't fetch current state in common case | Erik Johnston | 2017-02-27 | 1 | -0/+17 |
| | | | | | | Currently we fetch the list of current state events whenever we send something in a room. This is overkill for the common case of persisting a simple chain of non-state events, so lets handle that case specially. | ||||
* | Ignore new rejected events when working out forward extremeties. | Erik Johnston | 2017-02-08 | 1 | -9/+6 |
| | |||||
* | Merge pull request #1870 from matrix-org/erikj/cache_get_all_new_events | Erik Johnston | 2017-02-01 | 1 | -0/+2 |
|\ | | | | | Add a small cache get_all_new_events | ||||
| * | Add a small cache get_all_new_events | Erik Johnston | 2017-02-01 | 1 | -0/+2 |
| | | |||||
* | | Only invalidate membership caches based on the cache stream | Erik Johnston | 2017-01-31 | 1 | -20/+0 |
|/ | | | | | Before we completely invalidated get_users_in_room whenever we updated any current_state_events table. This was way too aggressive. | ||||
* | Stream cache invalidations for room membership storage functions | Erik Johnston | 2017-01-30 | 1 | -2/+6 |
| | |||||
* | Typo | Erik Johnston | 2017-01-23 | 1 | -1/+1 |
| | |||||
* | Refactor to calculate state delta outside transaction | Erik Johnston | 2017-01-23 | 1 | -87/+118 |
| | |||||
* | Comments | Erik Johnston | 2017-01-20 | 1 | -8/+19 |
| | |||||
* | Insert delta of current_state_events to be more efficient | Erik Johnston | 2017-01-20 | 1 | -26/+52 |
| | |||||
* | Spelling | Erik Johnston | 2017-01-20 | 1 | -1/+1 |
| | |||||
* | Update all call sites after rename | Erik Johnston | 2017-01-20 | 1 | -1/+1 |
| | |||||
* | Comments | Erik Johnston | 2017-01-20 | 1 | -0/+11 |
| | |||||
* | Calculate the forward extremeties once | Erik Johnston | 2017-01-20 | 1 | -56/+86 |
| | |||||
* | Derive current_state_events from state groups | Erik Johnston | 2017-01-20 | 1 | -70/+118 |
| | |||||
* | Lower loading events log to DEBUG | Erik Johnston | 2017-01-17 | 1 | -2/+2 |
| | |||||
* | More logging for the linearizer and for get_events | Mark Haines | 2017-01-05 | 1 | -0/+2 |
| | |||||
* | New Flake8 fixes | Erik Johnston | 2016-11-15 | 1 | -0/+1 |
| | |||||
* | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/remove_auth | Erik Johnston | 2016-10-17 | 1 | -15/+29 |
|\ | |||||
| * | Fix background reindex of origin_server_ts | Erik Johnston | 2016-09-27 | 1 | -15/+29 |
| | | | | | | | | | | | | | | | | The storage function `_get_events_txn` was removed everywhere except from this background reindex. The function was removed due to it being (almost) completely unused while also being large and complex. Therefore, instead of resurrecting `_get_events_txn` we manually reimplement the bits that are needed directly. | ||||
* | | Drop some unused indices | Erik Johnston | 2016-10-17 | 1 | -1/+0 |
|/ | |||||
* | Index contains_url for file search queries | Erik Johnston | 2016-09-12 | 1 | -0/+8 |
| | |||||
* | Take value in a better way | Erik Johnston | 2016-09-05 | 1 | -1/+1 |
| | |||||
* | Correctly delete old state groups in purge history API | Erik Johnston | 2016-09-05 | 1 | -20/+79 |
| | |||||
* | Limit the length of state chains | Erik Johnston | 2016-09-02 | 1 | -21/+28 |
| | |||||
* | Generate state group ids in state layer | Erik Johnston | 2016-08-31 | 1 | -9/+1 |
| | |||||
* | Make _state_groups_id_gen a normal IdGenerator | Erik Johnston | 2016-08-30 | 1 | -44/+39 |
| | |||||
* | Use state handler instead of get_users_in_room/get_joined_hosts | Erik Johnston | 2016-08-26 | 1 | -1/+0 |
| | |||||
* | Preserve some logcontexts | Erik Johnston | 2016-08-24 | 1 | -6/+10 |
| | |||||
* | Move defer.returnValue out of Measure | Erik Johnston | 2016-08-19 | 1 | -1/+1 |
| | |||||
* | Measure _get_event_from_row | Erik Johnston | 2016-08-19 | 1 | -41/+43 |
| | |||||
* | Add missing database corruption recovery case | Benjamin Saunders | 2016-08-14 | 1 | -1/+2 |
| | | | | Signed-off-by: Benjamin Saunders <ben.e.saunders@gmail.com> | ||||
* | Raise 404 when couldn't find event | Erik Johnston | 2016-08-05 | 1 | -1/+1 |
| | |||||
* | Delete more tables | Erik Johnston | 2016-08-05 | 1 | -0/+5 |
| | |||||
* | Tweak integrity error recovery to work as intended | Benjamin Saunders | 2016-08-04 | 1 | -0/+3 |
| | |||||
* | Fix typo | Erik Johnston | 2016-08-04 | 1 | -3/+4 |
| | |||||
* | Retry event persistence on IntegrityError | Erik Johnston | 2016-08-04 | 1 | -4/+65 |
| | | | | | | | | | | Due to a bug in the porting script some backfilled events were not correctly persisted, causing irrecoverable IntegrityErrors on future attempts to persist those events. This commit adds a retry mechanism invoked upon IntegrityError, where when retried the tables are purged for all references to the events being persisted. | ||||
* | Remove other bit of deduplication | Erik Johnston | 2016-08-03 | 1 | -19/+0 |
| | |||||
* | Ensure we only persist an event once at a time | Erik Johnston | 2016-08-03 | 1 | -1/+18 |
| | |||||
* | Fix how push_actions are redacted. | Mark Haines | 2016-07-26 | 1 | -8/+10 |
| | |||||
* | Don't add rejected events if we've seen them befrore. Add some comments to ↵ | Mark Haines | 2016-07-26 | 1 | -5/+48 |
| | | | | explain what the code is doing mechanically | ||||
* | Only update the events and event_json tables for rejected events | Mark Haines | 2016-07-25 | 1 | -51/+62 |
| | |||||
* | Don't add the events to forward extremities if the event is rejected | Mark Haines | 2016-07-25 | 1 | -3/+6 |
| | |||||
* | Don't add rejections to the state_group, persist all rejections | Mark Haines | 2016-07-25 | 1 | -4/+5 |
| | |||||
* | Merge pull request #922 from matrix-org/erikj/file_api2 | Erik Johnston | 2016-07-20 | 1 | -0/+82 |
|\ | | | | | Feature: Add filter to /messages. Add 'contains_url' to filter. | ||||
| * | Add sender and contains_url field to events table | Erik Johnston | 2016-07-14 | 1 | -0/+82 |
| | | |||||
* | | Fix /purge_history bug | Erik Johnston | 2016-07-15 | 1 | -19/+15 |
| | | | | | | | | This was caused by trying to insert duplicate backward extremeties | ||||
* | | event_backwards_extremeties may not be empty | Erik Johnston | 2016-07-15 | 1 | -1/+11 |
|/ | |||||
* | Comment | Erik Johnston | 2016-07-07 | 1 | -0/+3 |
| | |||||
* | Return 400 rather than 500 | Erik Johnston | 2016-07-07 | 1 | -1/+4 |
| | |||||
* | Add rest servlet. Fix SQL. | Erik Johnston | 2016-07-06 | 1 | -5/+4 |
| | |||||
* | Add purge_history API | Erik Johnston | 2016-07-05 | 1 | -0/+6 |
| | |||||
* | Add storage function to purge history for a room | Erik Johnston | 2016-07-04 | 1 | -0/+140 |
| | |||||
* | Use similar naming we use in email notifs for push | David Baker | 2016-06-24 | 1 | -7/+0 |
| | | | | Fixes https://github.com/vector-im/vector-web/issues/1654 | ||||
* | Merge pull request #841 from matrix-org/erikj/event_counter | Erik Johnston | 2016-06-06 | 1 | -0/+9 |
|\ | | | | | Add metric counter for number of persisted events | ||||
| * | Add metric counter for number of persisted events | Erik Johnston | 2016-06-06 | 1 | -0/+9 |
| | | |||||
* | | Add events to cache when we persist them | Erik Johnston | 2016-06-06 | 1 | -0/+41 |
|/ | |||||
* | Don't rely on options when inserting event into cache | Erik Johnston | 2016-06-03 | 1 | -40/+43 |
| | |||||
* | Change the way we cache events | Erik Johnston | 2016-06-03 | 1 | -39/+41 |
| | |||||
* | Remove event fetching from DB threads | Erik Johnston | 2016-06-03 | 1 | -138/+0 |
| | |||||
* | Use state to calculate get_users_in_room | Erik Johnston | 2016-06-01 | 1 | -3/+0 |
| | |||||
* | Merge remote-tracking branch 'origin/develop' into dbkr/email_notifs | David Baker | 2016-05-10 | 1 | -11/+149 |
|\ | |||||
| * | Remove unused import | Erik Johnston | 2016-05-06 | 1 | -1/+1 |
| | | |||||
| * | Pull loop one level up | Erik Johnston | 2016-05-06 | 1 | -36/+41 |
| | | |||||
| * | Queue events for persistence | Erik Johnston | 2016-05-06 | 1 | -11/+144 |
| | | |||||
* | | Merge remote-tracking branch 'origin/develop' into dbkr/email_notifs | David Baker | 2016-04-29 | 1 | -2/+8 |
|\| | |||||
| * | Check that somethign has happend before running the selects | Mark Haines | 2016-04-27 | 1 | -2/+8 |
| | | |||||
* | | First bits of emailpusher | David Baker | 2016-04-19 | 1 | -0/+2 |
|/ | | | | Mostly logic of when to send an email | ||||
* | Add back backfilled parameter that was removed | Erik Johnston | 2016-04-12 | 1 | -3/+4 |
| | |||||
* | Check if we've already backfilled events | Erik Johnston | 2016-04-12 | 1 | -0/+16 |
| | |||||
* | Merge remote-tracking branch 'origin/develop' into ↵ | David Baker | 2016-04-07 | 1 | -2/+2 |
|\ | | | | | | | dbkr/pushers_use_event_actions | ||||
| * | Add a slaved events store class | Mark Haines | 2016-04-06 | 1 | -2/+2 |
| | | | | | | | | | | Add a test to check that get_room_names_and_aliases does the same thing on both the master and on the slave data store. | ||||
* | | pep8 | David Baker | 2016-04-06 | 1 | -1/+3 |
| | | |||||
* | | Make pushers use the event_push_actions table instead of listening on an ↵ | David Baker | 2016-04-06 | 1 | -0/+12 |
|/ | | | | | | | event stream & running the rules again. Sytest passes, but remaining to do: * Make badges work again * Remove old, unused code | ||||
* | Store invites in a separate table. | Erik Johnston | 2016-04-04 | 1 | -9/+4 |
| | |||||
* | Merge pull request #684 from matrix-org/markjh/backfill_id_gen | Mark Haines | 2016-04-01 | 1 | -14/+5 |
|\ | | | | | Use a stream id generator for backfilled ids | ||||
| * | Use a stream id generator for backfilled ids | Mark Haines | 2016-04-01 | 1 | -14/+5 |
| | | |||||
* | | Fix the invalidation of the names and aliases cache | Mark Haines | 2016-04-01 | 1 | -1/+1 |
|/ | |||||
* | Move the check for backfilled outside the for loop | Mark Haines | 2016-03-31 | 1 | -5/+5 |
| | |||||
* | Remove the is_new_state argument to persist event. | Mark Haines | 2016-03-31 | 1 | -40/+50 |
| | | | | | | | | | Move the checks for whether an event is new state inside persist event itself. This was harder than expected because there wasn't enough information passed to persist event to correctly handle invites from remote servers for new rooms. | ||||
* | Merge pull request #676 from matrix-org/markjh/replicate_stateIII | Mark Haines | 2016-03-31 | 1 | -2/+76 |
|\ | | | | | Add replication streams for ex outliers and current state resets | ||||
| * | Use a namedtuple rather than tuple unpacking | Mark Haines | 2016-03-31 | 1 | -2/+9 |
| | | |||||
| * | Add replication streams for ex outliers and current state resets | Mark Haines | 2016-03-30 | 1 | -1/+59 |
| | | |||||
| * | Add a entry to current_state_resets table when the current state is reset | Mark Haines | 2016-03-30 | 1 | -0/+9 |
| | | |||||
* | | return the state_group for backfill | Mark Haines | 2016-03-30 | 1 | -1/+2 |
|/ | |||||
* | Add a replication stream for state groups | Mark Haines | 2016-03-30 | 1 | -1/+5 |
| | |||||
* | Use a stream id generator to assign state group ids | Mark Haines | 2016-03-30 | 1 | -40/+50 |
| | |||||
* | Merge pull request #665 from matrix-org/erikj/dont_cache_events | Erik Johnston | 2016-03-23 | 1 | -2/+2 |
|\ | | | | | Only cache events in the event cache | ||||
| * | Don't cache events in get_current_state_for_key | Erik Johnston | 2016-03-23 | 1 | -2/+2 |
| | | |||||
* | | Make StateHandler._state_cache only store event_ids. | Erik Johnston | 2016-03-22 | 1 | -0/+25 |
|/ | |||||
* | Remove unused backfilled parameter from persist_event | Mark Haines | 2016-03-21 | 1 | -18/+4 |
| | |||||
* | Dedupe requested event list in _get_events | Erik Johnston | 2016-03-18 | 1 | -14/+12 |
| | |||||
* | Fix relative imports so they work in both py3 and py27 | Mark Haines | 2016-03-08 | 1 | -1/+1 |
| | |||||
* | Merge pull request #489 from matrix-org/markjh/replication | Mark Haines | 2016-03-01 | 1 | -0/+45 |
|\ | | | | | Add a /replication API for extracting the updates that happened on synapse. | ||||
| * | Add a /replication API for extracting the updates that happened on | Mark Haines | 2016-03-01 | 1 | -0/+45 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 constructor | Mark Haines | 2016-03-01 | 1 | -3/+3 |
|/ | | | | | | | | | 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_token | Erik Johnston | 2016-02-18 | 1 | -1/+1 |
| | |||||
* | Rename functions | Erik Johnston | 2016-02-10 | 1 | -2/+2 |
| | |||||
* | Atomically persit push actions when we persist the event | Erik Johnston | 2016-02-09 | 1 | -10/+16 |
| | |||||
* | Fix up logcontexts | Erik Johnston | 2016-02-08 | 1 | -14/+20 |
| | |||||
* | Fix flake8 warnings for new flake8 | Daniel Wagner-Hall | 2016-02-02 | 1 | -3/+3 |
| | |||||
* | Cache tags and account data | Erik Johnston | 2016-01-28 | 1 | -1/+1 |
| | |||||
* | Invalidate caches properly. Remove unused arg | Erik Johnston | 2016-01-28 | 1 | -3/+6 |
| | |||||
* | PEP8 | Erik Johnston | 2016-01-27 | 1 | -1/+3 |
| | |||||
* | Use the same path for incremental with gap or without gap | Erik Johnston | 2016-01-27 | 1 | -1/+0 |
| | |||||
* | Add cache to room stream | Erik Johnston | 2016-01-27 | 1 | -0/+2 |
| | |||||
* | Add a Homeserver.setup method. | Erik Johnston | 2016-01-26 | 1 | -9/+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. | ||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Log when we skip daily messages | Daniel Wagner-Hall | 2016-01-06 | 1 | -1/+10 |
| | |||||
* | Track the time spent in the database per request. | Mark Haines | 2015-12-07 | 1 | -1/+1 |
| | | | | and track the number of transactions that request started. | ||||
* | Allow paginating search ordered by recents | Erik Johnston | 2015-11-30 | 1 | -0/+77 |
| | |||||
* | Implementation of state rollback in /sync | Richard van der Hoff | 2015-11-13 | 1 | -2/+4 |
| | | | | | | | Implementation of SPEC-254: roll back the state dictionary to how it looked at the start of the timeline. Merged PR https://github.com/matrix-org/synapse/pull/373 | ||||
* | Return world_readable and guest_can_join in /publicRooms | Daniel Wagner-Hall | 2015-11-10 | 1 | -0/+2 |
| | |||||
* | Open up /events to anonymous users for room events only | Daniel Wagner-Hall | 2015-11-05 | 1 | -0/+2 |
| | | | | Squash-merge of PR #345 from daniel/anonymousevents | ||||
* | Keep FTS indexes up to date. Only search through rooms currently joined | Erik Johnston | 2015-10-12 | 1 | -0/+2 |
| | |||||
* | Remove unused functions from synapse/storage/events.py | Mark Haines | 2015-09-23 | 1 | -11/+0 |
| | |||||
* | Add docstring | Daniel Wagner-Hall | 2015-09-22 | 1 | -0/+6 |
| | |||||
* | Implement configurable stats reporting | Daniel Wagner-Hall | 2015-09-22 | 1 | -1/+57 |
| | | | | | | | | | | SYN-287 This requires that HS owners either opt in or out of stats reporting. When --generate-config is passed, --report-stats must be specified If an already-generated config is used, and doesn't have the report_stats key, it is requested to be set. | ||||
* | Merge pull request #281 from matrix-org/erikj/update_extremeties | Erik Johnston | 2015-09-15 | 1 | -0/+2 |
|\ | | | | | When updating a stored event from outlier to non-outlier, remember to update the extremeties | ||||
| * | When updating a stored event from outlier to non-outlier, remember to update ↵ | Erik Johnston | 2015-09-15 | 1 | -0/+2 |
| | | | | | | | | the extremeties | ||||
* | | Fix indent | Mark Haines | 2015-08-24 | 1 | -1/+1 |
| | | |||||
* | | Remove syutil dependency in favour of smaller single-purpose libraries | Mark Haines | 2015-08-24 | 1 | -11/+12 |
|/ | |||||
* | Fix bug where we didn't correctly serialize the redacted_because key over ↵ | Erik Johnston | 2015-08-21 | 1 | -0/+2 |
| | | | | federation | ||||
* | Change Cache to not use *args in its interface | Erik Johnston | 2015-08-07 | 1 | -10/+11 |
| | |||||
* | Remove commented out code | Erik Johnston | 2015-07-10 | 1 | -14/+0 |
| | |||||
* | Add bulk insert events API | Erik Johnston | 2015-06-25 | 1 | -166/+249 |
| | |||||
* | Don't explode if we don't have the event | Erik Johnston | 2015-06-01 | 1 | -1/+3 |
| | |||||
* | Add config option to turn off freezing events. Use new encode_json api and ↵ | Erik Johnston | 2015-05-29 | 1 | -10/+13 |
| | | | | ujson.loads | ||||
* | Merge branch 'master' of github.com:matrix-org/synapse into develop | Erik Johnston | 2015-05-22 | 1 | -7/+18 |
|\ | |||||
| * | Add caches for things requested by the pushers | Mark Haines | 2015-05-21 | 1 | -7/+12 |
| | | |||||
| * | Add a cache for get_current_state with state_key | Mark Haines | 2015-05-21 | 1 | -0/+6 |
| | | |||||
* | | Merge pull request #155 from matrix-org/erikj/perf | Erik Johnston | 2015-05-21 | 1 | -51/+337 |
|\ \ | | | | | | | Bulk and batch retrieval of events. | ||||
| * | | s/for events/for requests for events/ | Erik Johnston | 2015-05-21 | 1 | -1/+1 |
| | | | |||||
| * | | s/for events/for requests for events/ | Erik Johnston | 2015-05-21 | 1 | -1/+1 |
| | | |