Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Move storage classes into a main "data store". | Erik Johnston | 2019-10-21 | 1 | -882/+0 |
| | | | | | This is in preparation for having multiple data stores that offer different functionality, e.g. splitting out state or event storage. | ||||
* | Replace IN usage with helper funcs | Erik Johnston | 2019-10-10 | 1 | -12/+16 |
| | |||||
* | Fix fetching censored redactions from DB | Erik Johnston | 2019-10-02 | 1 | -0/+14 |
| | | | | | | Fetching a censored redactions caused an exception due to the code expecting redactions to have a `redact` key, which redacted redactions don't have. | ||||
* | Handle loops in redaction events | Richard van der Hoff | 2019-07-30 | 1 | -60/+36 |
| | |||||
* | recursively fetch redactions | Richard van der Hoff | 2019-07-30 | 1 | -32/+36 |
| | |||||
* | split _get_events_from_db out of _enqueue_events | Richard van der Hoff | 2019-07-29 | 1 | -32/+51 |
| | |||||
* | Return dicts from _fetch_event_list | Richard van der Hoff | 2019-07-29 | 1 | -15/+27 |
| | |||||
* | Merge branch 'master' into develop | Richard van der Hoff | 2019-07-26 | 1 | -0/+4 |
|\ | |||||
| * | Fix DoS when there is a cycle in redaction events | Richard van der Hoff | 2019-07-26 | 1 | -0/+4 |
| | | | | | | | | | | Make sure that synapse doesn't explode when a redaction redacts itself, or there is a larger cycle. | ||||
* | | Merge pull request #5767 from matrix-org/rav/redactions/cross_room_id | Richard van der Hoff | 2019-07-25 | 1 | -0/+27 |
|\| | | | | | log when a redaction attempts to redact an event in a different room | ||||
| * | log when a redaction attempts to redact an event in a different room | Richard van der Hoff | 2019-07-25 | 1 | -0/+27 |
| | | |||||
* | | Stop trying to fetch events with event_id=None. (#5753) | Richard van der Hoff | 2019-07-24 | 1 | -1/+4 |
| | | | | | | | | | | | | | | `None` is not a valid event id, so queuing up a database fetch for it seems like a silly thing to do. I considered making `get_event` return `None` if `event_id is None`, but then its interaction with `allow_none` seemed uninituitive, and strong typing ftw. | ||||
* | | Replace returnValue with return (#5736) | Amber Brown | 2019-07-23 | 1 | -10/+10 |
|/ | |||||
* | Ignore redactions of m.room.create events (#5701) | Richard van der Hoff | 2019-07-17 | 1 | -0/+12 |
| | |||||
* | More refactoring in `get_events_as_list` (#5707) | Richard van der Hoff | 2019-07-17 | 1 | -27/+37 |
| | | | | | | | | We can now use `_get_events_from_cache_or_db` rather than going right back to the database, which means that (a) we can benefit from caching, and (b) it opens the way forward to more extensive checks on the original event. We now always require the original event to exist before we will serve up a redaction. | ||||
* | Fix redaction authentication (#5700) | Richard van der Hoff | 2019-07-17 | 1 | -85/+129 |
| | | | | | | | | | | | | | | | | | Ensures that redactions are correctly authenticated for recent room versions. There are a few things going on here: * `_fetch_event_rows` is updated to return a dict rather than a list of rows. * Rather than returning multiple copies of an event which was redacted multiple times, it returns the redactions as a list within the dict. * It also returns the actual rejection reason, rather than merely the fact that it was rejected, so that we don't have to query the table again in `_get_event_from_row`. * The redaction handling is factored out of `_get_event_from_row`, and now checks if any of the redactions are valid. | ||||
* | Refactor `get_events_as_list` (#5699) | Richard van der Hoff | 2019-07-17 | 1 | -48/+74 |
| | | | | | | | | | | | A couple of changes here: * get rid of a redundant `allow_rejected` condition - we should already have filtered out any rejected events before we get to that point in the code, and the redundancy is confusing. Instead, let's stick in an assertion just to make double-sure we aren't leaking rejected events by mistake. * factor out a `_get_events_from_cache_or_db` method, which is going to be important for a forthcoming fix to redactions. | ||||
* | small typo fix (#5655) | Andrew Morgan | 2019-07-11 | 1 | -1/+1 |
| | |||||
* | Move logging utilities out of the side drawer of util/ and into logging/ (#5606) | Amber Brown | 2019-07-04 | 1 | -3/+3 |
| | |||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -5/+5 |
| | |||||
* | Fix background updates to handle redactions/rejections (#5352) | Erik Johnston | 2019-06-06 | 1 | -0/+37 |
| | | | | | | | | * Fix background updates to handle redactions/rejections In background updates based on current state delta stream we need to handle that we may not have all the events (or at least that `get_events` may raise an exception). | ||||
* | Join against events to use its room_id index | Erik Johnston | 2019-05-30 | 1 | -1/+6 |
| | |||||
* | Implement the SHHS complexity API (#5216) | Amber Brown | 2019-05-30 | 1 | -1/+49 |
| | |||||
* | Simplifications and comments in do_auth (#5227) | Richard van der Hoff | 2019-05-23 | 1 | -1/+1 |
| | | | | | I was staring at this function trying to figure out wtf it was actually doing. This is (hopefully) a non-functional refactor which makes it a bit clearer. | ||||
* | Room Statistics (#4338) | Amber Brown | 2019-05-21 | 1 | -0/+24 |
| | |||||
* | Update docstring with correct type | Erik Johnston | 2019-05-15 | 1 | -1/+1 |
| | | | Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | ||||
* | Expose DataStore._get_events as get_events_as_list | Erik Johnston | 2019-05-14 | 1 | -15/+35 |
| | | | | 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 | -72/+66 |
| | |||||
* | Collect room-version variations into one place (#4969) | Richard van der Hoff | 2019-04-01 | 1 | -1/+2 |
| | | | | Collect all the things that make room-versions different to one another into one place, so that it's easier to define new room versions. | ||||
* | Fix infinite loop when an event is redacted in a v3 room (#4535) | Richard van der Hoff | 2019-01-31 | 1 | -5/+32 |
| | |||||
* | Fix flake8 (#4519) | Amber Brown | 2019-01-30 | 1 | -1/+1 |
| | |||||
* | Update synapse/storage/events_worker.py | Erik Johnston | 2019-01-29 | 1 | -1/+1 |
| | |||||
* | Check redaction state when event is pulled out of the database | Erik Johnston | 2019-01-29 | 1 | -0/+13 |
| | |||||
* | Fix typo | Erik Johnston | 2019-01-29 | 1 | -1/+1 |
| | |||||
* | Remove unused arg | Erik Johnston | 2019-01-29 | 1 | -2/+1 |
| | |||||
* | Update synapse/storage/events_worker.py | Richard van der Hoff | 2019-01-29 | 1 | -1/+1 |
| | | | Co-Authored-By: erikjohnston <erikj@jki.re> | ||||
* | Implement rechecking of redactions | Erik Johnston | 2019-01-29 | 1 | -1/+25 |
| | |||||
* | Replace missed usages of FrozenEvent | Erik Johnston | 2019-01-25 | 1 | -6/+2 |
| | |||||
* | Revert "Require event format version to parse or create events" | Erik Johnston | 2019-01-25 | 1 | -2/+6 |
| | |||||
* | Replace missed usages of FrozenEvent | Erik Johnston | 2019-01-24 | 1 | -6/+2 |
| | |||||
* | isort | Erik Johnston | 2019-01-23 | 1 | -1/+1 |
| | |||||
* | Add support for persisting event format versions | Erik Johnston | 2019-01-23 | 1 | -4/+15 |
| | | | | | | | | | | | | | | Currently we only have the one event format version defined, but this adds the necessary infrastructure to persist and fetch the format versions alongside the events. We specify the format version rather than the room version as: 1. We don't necessarily know the room version, existing events may be either v1 or v2. 2. We'd need to be careful to prevent/handle correctly if different events in the same room reported to be of different versions, which sounds annoying. | ||||
* | Port storage/ to Python 3 (#3725) | Amber Brown | 2018-08-31 | 1 | -4/+5 |
| | |||||
* | Pull in necessary stores in federation_reader | Erik Johnston | 2018-08-06 | 1 | -1/+0 |
| | |||||
* | Move necessary storage functions to worker classes | Erik Johnston | 2018-08-06 | 1 | -0/+84 |
| | |||||
* | Merge branch 'master' into develop | Richard van der Hoff | 2018-08-02 | 1 | -6/+14 |
|\ | |||||
| * | Avoid extra db lookups | Richard van der Hoff | 2018-08-02 | 1 | -6/+14 |
| | | | | | | | | | | Since we're about to look up the events themselves anyway, we can skip the extra db queries here. | ||||
* | | Run things as background processes | Richard van der Hoff | 2018-07-18 | 1 | -4/+6 |
|/ | | | | | | | | 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). | ||||
* | Attempt to include db threads in cpu usage stats (#3496) | Richard van der Hoff | 2018-07-10 | 1 | -1/+2 |
| | | | | | Let's try to include time spent in the DB threads in the per-request/block cpu usage metrics. | ||||
* | Add CPU metrics for _fetch_event_list | Richard van der Hoff | 2018-07-09 | 1 | -19/+32 |
| | | | | | add a Measure block on _fetch_event_list, in the hope that we can better measure CPU usage here. | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -13/+12 |
| | |||||
* | Attempt to be more performant on PyPy (#3462) | Amber Brown | 2018-06-28 | 1 | -1/+2 |
| | |||||
* | Merge pull request #3419 from matrix-org/rav/events_per_request | Richard van der Hoff | 2018-06-22 | 1 | -0/+4 |
|\ | | | | | Log number of events fetched from DB | ||||
| * | Indirect evt_count updates via method call | Richard van der Hoff | 2018-06-22 | 1 | -1/+1 |
| | | | | | | | | so that we can stub it for the sentinel and not have a billion failing UTs | ||||
| * | Log number of events fetched from DB | Richard van der Hoff | 2018-06-21 | 1 | -0/+4 |
| | | | | | | | | | | | | | | | | | | | | When we finish processing a request, log the number of events we fetched from the database to handle it. [I'm trying to figure out which requests are responsible for large amounts of event cache churn. It may turn out to be more helpful to add counts to the prometheus per-request/block metrics, but that is an extension to this code anyway.] | ||||
* | | Pass around the reactor explicitly (#3385) | Amber Brown | 2018-06-22 | 1 | -3/+3 |
|/ | |||||
* | Misc. py3 fixes | Adrian Tschira | 2018-05-24 | 1 | -1/+1 |
| | | | | Signed-off-by: Adrian Tschira <nota@notafile.com> | ||||
* | Use run_in_background in preference to preserve_fn | Richard van der Hoff | 2018-04-27 | 1 | -2/+3 |
| | | | | | | While I was going through uses of preserve_fn for other PRs, I converted places which only use the wrapped function once to use run_in_background, to avoid creating the function object. | ||||
* | Format docstring | Erik Johnston | 2018-04-12 | 1 | -2/+3 |
| | |||||
* | Doc we raise on unknown event | Erik Johnston | 2018-04-12 | 1 | -2/+3 |
| | |||||
* | Track last processed event received_ts | Erik Johnston | 2018-04-11 | 1 | -0/+18 |
| | |||||
* | Replace some ujson with simplejson to make it work | Erik Johnston | 2018-03-16 | 1 | -1/+1 |
| | |||||
* | Split EventsWorkerStore into separate file | Erik Johnston | 2018-02-23 | 1 | -0/+395 |