Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge branch 'develop' of github.com:matrix-org/synapse into ↵ | Erik Johnston | 2017-04-04 | 1 | -13/+10 |
|\ | | | | | | | erikj/repl_tcp_server | ||||
| * | Remove spurious PreserveLoggingContext | Richard van der Hoff | 2017-04-03 | 1 | -6/+5 |
| | | | | | | | | | | In `on_new_room_event`, remove `PreserveLoggingContext` - we can call its subroutines with the logcontext set. | ||||
| * | preserve_fn some deferred-returning things | Richard van der Hoff | 2017-04-03 | 1 | -2/+5 |
| | | | | | | | | | | In `Notifier._on_new_room_event`, `preserve_fn` around its subroutines which return deferreds, so that it is safe to call it with an active logcontext. | ||||
| * | Remove spurious @preserve_fn decorators | Richard van der Hoff | 2017-04-03 | 1 | -5/+0 |
| | | | | | | | | | | | | | | | | Remove `@preserve_fn` decorators on `on_new_room_event`, `_notify_pending_new_room_events`, `_on_new_room_event`, `on_new_event`, and `on_new_replication_data` - none of these functions return a deferred, and the decorator does nothing unless the wrapped function returns a deferred, so the decorator was a no-op. | ||||
* | | Use callbacks to notify tcp replication rather than deferreds | Erik Johnston | 2017-03-31 | 1 | -6/+11 |
| | | |||||
* | | Add a simple hook to wait for replication traffic | Erik Johnston | 2017-03-30 | 1 | -0/+6 |
|/ | |||||
* | Don't recreate so many sets | Erik Johnston | 2017-03-16 | 1 | -4/+2 |
| | |||||
* | Format presence events on the edges instead of reformatting them multiple times | Erik Johnston | 2017-03-15 | 1 | -0/+10 |
| | |||||
* | Add some metrics on notifier | Erik Johnston | 2017-03-15 | 1 | -0/+6 |
| | |||||
* | Reduce spurious calls to generate sync | Erik Johnston | 2017-03-14 | 1 | -13/+31 |
| | |||||
* | Make presence.get_new_events a bit faster | Erik Johnston | 2017-02-02 | 1 | -0/+1 |
| | | | | We do this by caching the set of users a user shares rooms with. | ||||
* | Correctly handle timeout errors | Erik Johnston | 2016-12-09 | 1 | -6/+14 |
| | |||||
* | Fix rare notifier bug where listeners dont timeout | Erik Johnston | 2016-12-09 | 1 | -11/+9 |
| | | | | | | There was a race condition that caused the notifier to 'miss' the timeout notification, since there were no other checks for the timeout this caused listeners to get stuck in a loop until something happened. | ||||
* | Ensure only main or federation_sender process can send federation traffic | Erik Johnston | 2016-11-23 | 1 | -2/+9 |
| | |||||
* | Handle sending events and device messages over federation | Erik Johnston | 2016-11-17 | 1 | -0/+2 |
| | |||||
* | Explicitly specify state_key for history_visibility fetching | Erik Johnston | 2016-09-02 | 1 | -1/+2 |
| | |||||
* | Preserve some logcontexts | Erik Johnston | 2016-08-24 | 1 | -1/+6 |
| | |||||
* | defer.returnValue must not be called within Measure | Erik Johnston | 2016-08-19 | 1 | -2/+1 |
| | |||||
* | Add measure blocks to notifier | Erik Johnston | 2016-08-19 | 1 | -15/+18 |
| | |||||
* | Make AppserviceHandler stream events from database | Erik Johnston | 2016-08-18 | 1 | -1/+1 |
| | | | | | | | | | This is for two reasons: 1. Suppresses duplicates correctly, as the notifier doesn't do any duplicate suppression. 2. Makes it easier to connect the AppserviceHandler to the replication stream. | ||||
* | Remove dead appservice code | Erik Johnston | 2016-08-17 | 1 | -39/+2 |
| | |||||
* | Notify users for events in rooms they join. | Mark Haines | 2016-06-07 | 1 | -8/+6 |
| | | | | | | Change how the notifier updates the map from room_id to user streams on receiving a join event. Make it update the map when it notifies for the join event, rather than using the "user_joined_room" distributor signal | ||||
* | Move the AS handler out of the Handlers object. | Mark Haines | 2016-05-31 | 1 | -6/+4 |
| | | | | | | Access it directly from the homeserver itself. It already wasn't inheriting from BaseHandler storing it on the Handlers object was already somewhat dubious. | ||||
* | move filter_events_for_client out of base handler | Mark Haines | 2016-05-11 | 1 | -2/+3 |
| | |||||
* | Run filter_events_for_client | David Baker | 2016-04-27 | 1 | -1/+1 |
| | | | | so we don't accidentally mail out events people shouldn't see | ||||
* | Use google style doc strings. | Mark Haines | 2016-04-01 | 1 | -7/+8 |
| | | | | | | | pycharm supports them so there is no need to use the other format. Might as well convert the existing strings to reduce the risk of people accidentally cargo culting the wrong doc string format. | ||||
* | Hook up adding a pusher to the notifier for replication. | Mark Haines | 2016-03-15 | 1 | -0/+6 |
| | |||||
* | Hook up the push rules to the notifier | Mark Haines | 2016-03-03 | 1 | -1/+1 |
| | |||||
* | Add a /replication API for extracting the updates that happened on | Mark Haines | 2016-03-01 | 1 | -0/+48 |
| | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | Fix up logcontexts | Erik Johnston | 2016-02-08 | 1 | -29/+29 |
| | |||||
* | Fix flake8 warnings for new flake8 | Daniel Wagner-Hall | 2016-02-02 | 1 | -1/+1 |
| | |||||
* | Don't use before_token. Its wrong. Use actual limit. | Erik Johnston | 2016-01-31 | 1 | -6/+3 |
| | |||||
* | Deal with None limit | Erik Johnston | 2016-01-29 | 1 | -1/+5 |
| | |||||
* | Make /events always return a newer token, if one exists | Erik Johnston | 2016-01-29 | 1 | -9/+10 |
| | |||||
* | Only fetch events for rooms and receipts | Erik Johnston | 2016-01-21 | 1 | -3/+3 |
| | |||||
* | SYN-606: Peeking does not wake up /events | Erik Johnston | 2016-01-21 | 1 | -1/+3 |
| | | | | | | If a real user attempted to first peek into one room, and then another, their room event stream would not be woken up for events in the later room. | ||||
* | Allow non-guests to peek on rooms using /events | Daniel Wagner-Hall | 2016-01-20 | 1 | -23/+48 |
| | |||||
* | Skip, rather than erroring, invalid guest requests | Daniel Wagner-Hall | 2016-01-05 | 1 | -2/+1 |
| | | | | | | | | | | Erroring causes problems when people make illegal requests, because they don't know what limit parameter they should pass. This is definitely buggy. It leaks message counts for rooms people don't have permission to see, via tokens. But apparently we already consciously decided to allow that as a team, so this preserves that behaviour. | ||||
* | Missing yield on guest access auth check | Mark Haines | 2015-12-23 | 1 | -1/+1 |
| | | | | Needs matrix-org/sytest#125 to land first | ||||
* | Return non-room events from guest /events calls | Daniel Wagner-Hall | 2015-11-12 | 1 | -3/+17 |
| | |||||
* | Open up /events to anonymous users for room events only | Daniel Wagner-Hall | 2015-11-05 | 1 | -8/+34 |
| | | | | Squash-merge of PR #345 from daniel/anonymousevents | ||||
* | Merge branch 'develop' into daniel/removesomelies | Mark Haines | 2015-11-04 | 1 | -1/+1 |
|\ | | | | | | | | | Conflicts: synapse/notifier.py | ||||
| * | Inform the client of new room tags using v1 /events | Mark Haines | 2015-10-29 | 1 | -1/+1 |
| | | |||||
* | | Remove unused arguments and code | Daniel Wagner-Hall | 2015-11-02 | 1 | -3/+3 |
|/ | |||||
* | Don't make pushers handle presence/typing events | Erik Johnston | 2015-08-24 | 1 | -1/+6 |
| | |||||
* | Improve naming | Daniel Wagner-Hall | 2015-07-20 | 1 | -2/+2 |
| | |||||
* | Consolidate duplicate code in notifier | Erik Johnston | 2015-07-02 | 1 | -24/+11 |
| | |||||
* | Add receipts_key to StreamToken | Erik Johnston | 2015-07-02 | 1 | -1/+1 |
| | |||||
* | Fix typo | Erik Johnston | 2015-06-19 | 1 | -1/+1 |
| | |||||
* | PEP8 | Erik Johnston | 2015-06-18 | 1 | -2/+3 |
| | |||||
* | Documentation | Erik Johnston | 2015-06-18 | 1 | -4/+11 |
| | |||||
* | Don't bother proxying lookups on _NotificationListener to underlying deferred | Erik Johnston | 2015-06-18 | 1 | -10/+2 |
| | |||||
* | Refactor the notifier.wait_for_events code to be clearer. Add ↵ | Erik Johnston | 2015-06-18 | 1 | -66/+56 |
| | | | | _NotifierUserStream.new_listener that accpets a token to avoid races. | ||||
* | Fix notifier leak | Erik Johnston | 2015-06-18 | 1 | -21/+20 |
| | |||||
* | Iterate over the user_streams not the user_ids | Mark Haines | 2015-05-26 | 1 | -1/+1 |
| | |||||
* | Oops, get_rooms_for_user returns a namedtuple, not a room_id | Mark Haines | 2015-05-21 | 1 | -0/+1 |
| | |||||
* | Don't bother sorting by the room_stream_ids, it shouldn't matter which order ↵ | Mark Haines | 2015-05-18 | 1 | -1/+1 |
| | | | | they are notified in | ||||
* | Make sure the notifier stream token goes forward when it is updated. Sort ↵ | Mark Haines | 2015-05-18 | 1 | -4/+4 |
| | | | | the pending events by the correct room_stream_id | ||||
* | Add some doc-strings to notifier | Mark Haines | 2015-05-14 | 1 | -19/+33 |
| | |||||
* | Use the current token when timing out a notifier, make sure the user_id is a ↵ | Mark Haines | 2015-05-14 | 1 | -2/+2 |
| | | | | string in on_new_user_event | ||||
* | Fix v2 sync, update the last_notified_ms only if there was an active listener | Mark Haines | 2015-05-14 | 1 | -5/+6 |
| | |||||
* | Fix metric counter | Mark Haines | 2015-05-13 | 1 | -2/+2 |
| | |||||
* | Discard unused NotifierUserStreams | Mark Haines | 2015-05-13 | 1 | -16/+34 |
| | |||||
* | Don't set a timer if there's already a result to return | Mark Haines | 2015-05-13 | 1 | -3/+10 |
| | |||||
* | Don't bother checking for new events from a source if the stream token ↵ | Mark Haines | 2015-05-13 | 1 | -2/+6 |
| | | | | hasn't advanced for that source | ||||
* | Don't bother checking for updates if the stream token hasn't advanced for a user | Mark Haines | 2015-05-13 | 1 | -24/+51 |
| | |||||
* | Merge branch 'notifier_unify' into notifier_performance | Mark Haines | 2015-05-12 | 1 | -13/+10 |
|\ | | | | | | | | | Conflicts: synapse/notifier.py | ||||
| * | Merge branch 'develop' into notifier_unify | Mark Haines | 2015-05-12 | 1 | -13/+10 |
| |\ | | | | | | | | | | | | | Conflicts: synapse/notifier.py | ||||
| | * | PEP8 | Erik Johnston | 2015-05-08 | 1 | -3/+2 |
| | | | |||||
| | * | Change the way we do logging contexts so that they survive divergences | Erik Johnston | 2015-05-08 | 1 | -9/+7 |
| | | | |||||
* | | | Merge branch 'notifier_unify' into notifier_performance | Mark Haines | 2015-05-12 | 1 | -1/+1 |
|\| | | |||||
| * | | Update the end_token correctly, otherwise the token doesn't advance and the ↵ | Mark Haines | 2015-05-12 | 1 | -1/+1 |
| | | | | | | | | | | | | client gets duplicate events | ||||
* | | | Add a NotifierUserStream to hold all the notification listeners for a user | Mark Haines | 2015-05-12 | 1 | -114/+116 |
|/ / | |||||
* | | Don't bother passing the events to the notifier since it isn't using them | Mark Haines | 2015-05-11 | 1 | -95/+18 |
| | | |||||
* | | Use wait_for_events to implement 'get_events' | Mark Haines | 2015-05-11 | 1 | -79/+30 |
|/ | |||||
* | Remove some run_on_reactors | Erik Johnston | 2015-05-01 | 1 | -5/+0 |
| | |||||
* | Change from exception to warn | Erik Johnston | 2015-04-15 | 1 | -1/+1 |
| | |||||
* | Add comment | Mark Haines | 2015-04-09 | 1 | -0/+1 |
| | |||||
* | Unset the timer in the timeout callback so that we don't try to cancel it if ↵ | Mark Haines | 2015-04-09 | 1 | -0/+1 |
| | | | | it has been called | ||||
* | SYN-339: Cancel the notifier timeout when the notifier fires | Mark Haines | 2015-04-09 | 1 | -4/+26 |
| | |||||
* | Move comment into docstring | Erik Johnston | 2015-04-08 | 1 | -5/+2 |
| | |||||
* | Factor out loops into '_discard_if_notified' | Erik Johnston | 2015-04-08 | 1 | -15/+14 |
| | |||||
* | Also perform paranoia checks in 'on_new_user_event' | Erik Johnston | 2015-04-08 | 1 | -2/+16 |
| | |||||
* | Add paranoia checks to make sure that we evict stale NotificationListeners ↵ | Erik Johnston | 2015-04-08 | 1 | -5/+31 |
| | | | | when we are about to process them | ||||
* | Fix bug where we didn't inform the NotificataionListeners about new rooms ↵ | Erik Johnston | 2015-04-08 | 1 | -0/+3 |
| | | | | they have been subscribed to. This meant that the listeners didn't clean themselves up fully from all the dicts | ||||
* | Appease pep8 | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -6/+9 |
| | |||||
* | Add a counter to track total number of events served by the notifier | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -0/+3 |
| | |||||
* | Use _ instead of . as a metric namespacing separator, for Prometheus | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -1/+1 |
| | |||||
* | Put some gauge metrics on the number of notifier listeners, and notified-on ↵ | Paul "LeoNerd" Evans | 2015-03-12 | 1 | -0/+39 |
| | | | | objects (users, rooms, appservices) | ||||
* | Rename rooms_to_listeners to room_to_listeners, for consistency with user_ ↵ | Paul "LeoNerd" Evans | 2015-03-05 | 1 | -8/+8 |
| | | | | and appservice_* | ||||
* | Notify appservices of invites mid-poll. | Kegan Dougal | 2015-02-27 | 1 | -1/+29 |
| | | | | | | | | This requires the notifier to have knowledge of appservice listeners so it can do the regex checks on incoming invites to see if the state_key matches. It isn't enough to just rely on the room listeners and store.get_app_service_rooms as the room will initially not exist or won't be on the ASes radar due to having none of its users in the room. | ||||
* | Merge branch 'consumeErrors' of github.com:matrix-org/synapse into develop | Erik Johnston | 2015-02-17 | 1 | -2/+4 |
|\ | |||||
| * | Use consumeErrors=True on all DeferredLists. | Erik Johnston | 2015-02-17 | 1 | -2/+4 |
| | | | | | | | | | | | | This is so that the DeferredLists actually consume the error instead of propogating down the non-existent errback chain. This should reduce the number of unhandled errors we are seeing. | ||||
* | | Glue AS work to general event notifications. Add more exception handling ↵ | Kegan Dougal | 2015-02-05 | 1 | -0/+6 |
|/ | | | | when poking ASes. | ||||
* | Fix Formatting | Mark Haines | 2015-01-27 | 1 | -2/+2 |
| | |||||
* | Wait for events if the incremental sync is empty and a timeout is given | Mark Haines | 2015-01-27 | 1 | -0/+48 |
| | |||||
* | Only start the notifier timeout once we've had a chance to check for ↵ | Mark Haines | 2015-01-19 | 1 | -2/+2 |
| | | | | updates. Otherwise the timeout could fire while we are waiting for the database to return any updates it might have | ||||
* | Update copyright notices | Mark Haines | 2015-01-06 | 1 | -1/+1 |
| | |||||
* | Remember to hook up the typing event stream to the notifier as well | Paul "LeoNerd" Evans | 2014-12-15 | 1 | -7/+25 |
| | |||||
* | Fix pep8 codestyle warnings | Mark Haines | 2014-11-20 | 1 | -0/+1 |
| | |||||
* | Add a few missing yields, Move deferred lists inside PreserveLoggingContext ↵ | Mark Haines | 2014-11-20 | 1 | -0/+3 |
| | | | | because they don't interact well with the logging contexts | ||||
* | remove unused import | Mark Haines | 2014-11-19 | 1 | -1/+1 |
| | |||||
* | Preserve logging context in a few more places, drop the logging context ↵ | Mark Haines | 2014-11-19 | 1 | -18/+22 |
| | | | | after it has been stashed to reduce potential for confusion | ||||
* | Fix pep8 warnings | Mark Haines | 2014-10-30 | 1 | -1/+2 |
| | |||||
* | Use floating-point rather than integer division to handle timeouts so that ↵ | Paul "LeoNerd" Evans | 2014-10-29 | 1 | -1/+1 |
| | | | | non-zero but sub-second waits don't collapse to zero | ||||
* | fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org ↵ | Matthew Hodgson | 2014-09-03 | 1 | -1/+1 |
| | | | | hasn't been incorporated in time for launch. | ||||
* | Make sure to print exceptions properly from notifier failures | Paul "LeoNerd" Evans | 2014-09-03 | 1 | -1/+6 |
| | |||||
* | Merge branch 'master' of github.com:matrix-org/synapse into release-v0.2.0 | Erik Johnston | 2014-09-02 | 1 | -2/+19 |
|\ | | | | | | | | | | | | | Conflicts: synapse/notifier.py webclient/room/room-controller.js webclient/room/room.html | ||||
| * | When notifying listeners, don't do so in a serial fashion | Erik Johnston | 2014-08-29 | 1 | -2/+19 |
| | | |||||
* | | Have EventSource's get_new_events_for_user() API work only on keys within ↵ | Paul "LeoNerd" Evans | 2014-08-29 | 1 | -10/+20 |
|/ | | | | that source, not overall eventstream tokens | ||||
* | Turn of trace_function logging | Erik Johnston | 2014-08-28 | 1 | -2/+2 |
| | |||||
* | And more logging. | Erik Johnston | 2014-08-28 | 1 | -1/+2 |
| | |||||
* | If timeout=0, return immediately | Erik Johnston | 2014-08-27 | 1 | -1/+5 |
| | |||||
* | Comments! | Erik Johnston | 2014-08-27 | 1 | -0/+35 |
| | |||||
* | Index sources in a nicer fashion. | Erik Johnston | 2014-08-27 | 1 | -3/+3 |
| | |||||
* | Implement presence event source. Change the way the notifier indexes listeners | Erik Johnston | 2014-08-27 | 1 | -43/+42 |
| | |||||
* | Enable presence again. Fix up api to match old api. | Erik Johnston | 2014-08-26 | 1 | -1/+19 |
| | |||||
* | WIP: Completely change how event streaming and pagination work. This ↵ | Erik Johnston | 2014-08-26 | 1 | -0/+184 |
reflects the change in the underlying storage model. |