summary refs log tree commit diff
path: root/synapse/replication (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add new storage functions to slave storeErik Johnston2017-05-041-0/+3
|
* Remove unused cacheErik Johnston2017-04-241-3/+0
|
* Merge pull request #2115 from matrix-org/erikj/dedupe_federation_replErik Johnston2017-04-122-0/+11
|\ | | | | Reduce federation replication traffic
| * Move get_presence_list_* to SlaveStoreErik Johnston2017-04-111-0/+10
| |
| * Reduce federation presence replication trafficErik Johnston2017-04-101-0/+1
| | | | | | | | | | | | | | | | This is mainly done by moving the calculation of where to send presence updates from the presence handler to the transaction queue, so we only need to send the presence event (and not the destinations) across the replication connection. Before we were duplicating by sending the full state across once per destination.
* | Remove HTTP replication APIsErik Johnston2017-04-114-749/+0
|/
* TypoErik Johnston2017-04-101-1/+1
|
* Merge pull request #2109 from matrix-org/erikj/send_queue_fixErik Johnston2017-04-101-2/+2
|\ | | | | Fix up federation SendQueue and document types
| * CommentsErik Johnston2017-04-101-2/+2
| |
* | Up replication ping timeoutErik Johnston2017-04-101-2/+4
|/
* Merge pull request #2103 from matrix-org/erikj/no-double-encodeErik Johnston2017-04-071-28/+76
|\ | | | | Don't double encode replication data
| * Document types of the replication streamsErik Johnston2017-04-061-28/+76
| |
* | Fix incorrect type when using InvalidateCacheCommandErik Johnston2017-04-061-1/+1
| |
* | Add log linesErik Johnston2017-04-051-1/+2
| |
* | Rearrange metricsErik Johnston2017-04-051-16/+31
| |
* | Fix typoErik Johnston2017-04-051-2/+2
| |
* | Fixup some metrics for tcp replErik Johnston2017-04-051-0/+16
|/
* Merge pull request #2097 from matrix-org/erikj/repl_tcp_clientErik Johnston2017-04-0511-171/+302
|\ | | | | Move to using TCP replication
| * Change slave storage to use new replication interfaceErik Johnston2017-04-0310-171/+106
| | | | | | | | | | | | | | As the TCP replication uses a slightly different API and streams than the HTTP replication. This breaks HTTP replication.
| * Add basic replication client handler and factoryErik Johnston2017-04-031-0/+196
| |
* | Merge pull request #2098 from matrix-org/erikj/repl_tcp_fixErik Johnston2017-04-043-6/+15
|\ \ | | | | | | Advance replication streams even if nothing is listening
| * | Advance replication streams even if nothing is listeningErik Johnston2017-04-043-6/+15
| |/ | | | | | | | | | | Otherwise the streams don't advance and steadily fall behind, so when a worker does connect either a) they'll be streamed lots of old updates or b) the connection will fail as the streams are too far behind.
* / Fiddle tcp replication loggingErik Johnston2017-04-041-2/+2
|/
* Always advance stream tokensErik Johnston2017-04-031-1/+4
|
* Use callbacks to notify tcp replication rather than deferredsErik Johnston2017-03-311-14/+1
|
* Add a timestamp to USER_SYNC commandErik Johnston2017-03-313-9/+17
| | | | This timestamp is used to indicate when the user last sync'd
* Fix up docsErik Johnston2017-03-312-19/+3
|
* Add server side resource for tcp replicationErik Johnston2017-03-301-0/+300
|
* Initial TCP protocol implementationErik Johnston2017-03-303-0/+974
| | | | This defines the low level TCP replication protocol
* Define the various streams we will replicateErik Johnston2017-03-302-0/+423
|
* Make federation send queue take the current positionErik Johnston2017-03-301-1/+1
|
* Add new storage functions for new replicationErik Johnston2017-03-301-1/+1
| | | | | The new replication protocol will keep all the streams separate, rather than muxing multiple streams into one.
* Use presence replication stream to invalidate cacheErik Johnston2017-03-241-0/+1
| | | | | | Instead of using the cache invalidation replication stream to invalidate the _get_presence_cache, we can instead rely on the presence replication stream. This reduces the amount of replication traffic considerably.
* Replace some calls to cursor_to_dictErik Johnston2017-03-241-1/+0
| | | | | cursor_to_dict can be surprisinglh expensive for large result sets, so lets only call it when we need to.
* PEP8Erik Johnston2017-03-201-2/+0
|
* Don't send the full event json over replicationErik Johnston2017-03-172-30/+16
|
* Fix assertion to stop transaction queue getting wedgedRichard van der Hoff2017-03-151-0/+5
| | | | | | | | ... and update some docstrings to correctly reflect the types being used. get_new_device_msgs_for_remote can return a long under some circumstances, which was being stored in last_device_list_stream_id_by_dest, and was then upsetting things on the next loop.
* Add new storage function to slave storeErik Johnston2017-03-131-0/+4
|
* Fix it for the workersErik Johnston2017-03-101-0/+8
|
* Don't log unknown cache warnings in workersErik Johnston2017-02-281-1/+3
|
* Aggregate event push actionsErik Johnston2017-02-141-0/+6
|
* Cache get_presence storageErik Johnston2017-02-131-1/+3
|
* Merge pull request #1912 from matrix-org/markjh/roominitialsyncErik Johnston2017-02-131-0/+6
|\ | | | | Add db functions needed for room initial sync to slave
| * Add db functions needed for room initial sync to slaveMark Haines2017-02-131-0/+6
| |
* | Fix replicationErik Johnston2017-02-021-0/+3
| |
* | Only invalidate membership caches based on the cache streamErik Johnston2017-01-312-19/+5
|/ | | | | Before we completely invalidated get_users_in_room whenever we updated any current_state_events table. This was way too aggressive.
* Rename funcErik Johnston2017-01-301-1/+1
|
* Hook device list updates to replicationErik Johnston2017-01-272-1/+91
|
* Insert delta of current_state_events to be more efficientErik Johnston2017-01-201-10/+0
|
* Add cache to get_public_room_ids_at_stream_idErik Johnston2016-12-121-1/+2
|
* Add new API appservice specific public room listErik Johnston2016-12-061-1/+1
|
* Ensure only main or federation_sender process can send federation trafficErik Johnston2016-11-231-1/+1
|
* Explicit federation ackErik Johnston2016-11-231-5/+10
|
* Invalidate retry cache in both directionsErik Johnston2016-11-224-6/+84
|
* Store federation stream positions in the databaseErik Johnston2016-11-211-0/+3
|
* Handle sending events and device messages over federationErik Johnston2016-11-174-7/+25
|
* Hook up the send queue and create a federation sender workerErik Johnston2016-11-163-0/+32
|
* Fix check of wrong variableErik Johnston2016-10-111-1/+1
|
* Reduce DB hits for replicationErik Johnston2016-09-231-36/+103
| | | | | | | | | | | | | | Some streams will occaisonally advance their positions without actually having any new rows to send over federation. Currently this means that the token will not advance on the workers, leading to them repeatedly sending a slightly out of date token. This in turns requires the master to hit the DB to check if there are any new rows, rather than hitting the no op logic where we check if the given token matches the current token. This commit changes the API to always return an entry if the position for a stream has changed, allowing workers to advance their tokens correctly.
* Fix public room pagination for client_reader appErik Johnston2016-09-161-0/+1
|
* Add new storage function to slave storeErik Johnston2016-09-161-0/+1
|
* Use stream_change cache to make get_forward_extremeties_for_room cache more ↵Erik Johnston2016-09-151-1/+4
| | | | effective
* Add cache to get_forward_extremeties_for_roomErik Johnston2016-09-151-1/+1
|
* Stream public room changes down replicationErik Johnston2016-09-153-1/+58
|
* Correctly handle typing stream id resettingErik Johnston2016-09-091-1/+8
|
* Drop replication log levelsErik Johnston2016-09-091-2/+2
|
* Track the max_stream_device_id in a separate table, since we delete from the ↵Mark Haines2016-09-091-1/+1
| | | | inbox table
* Merge branch 'develop' into markjh/direct_to_device_federationMark Haines2016-09-081-0/+3
|\
| * Add upgrade script that will slowly prune state_groups_state entriesErik Johnston2016-09-051-0/+3
| |
* | Fix the stream change cache to work over replicationMark Haines2016-09-071-0/+11
|/
* Merge pull request #1060 from matrix-org/erikj/state_idsErik Johnston2016-09-012-23/+2
|\ | | | | Assign state groups in state handler.
| * Add storage function to SlaveStoreErik Johnston2016-08-311-0/+1
| |
| * Remove state replication streamErik Johnston2016-08-301-23/+1
| |
* | Add a replication stream for direct to device messagesMark Haines2016-08-312-1/+30
|/
* Merge pull request #1049 from matrix-org/erikj/presence_users_in_roomErik Johnston2016-08-301-2/+5
|\ | | | | Use state handler instead of get_users_in_room/get_joined_hosts
| * Add to slave storeErik Johnston2016-08-301-0/+5
| |
| * Use state handler instead of get_users_in_room/get_joined_hostsErik Johnston2016-08-261-2/+0
| |
* | Add new direct message storage functions to slave storeErik Johnston2016-08-301-0/+30
|/
* Add is_host_joined to slave storageErik Johnston2016-08-261-0/+2
|
* Add new state storage funcs to replicationErik Johnston2016-08-261-0/+3
|
* Add appservice workerErik Johnston2016-08-182-0/+13
|
* Use cached get_user_by_access_token in slavesErik Johnston2016-08-162-2/+2
|
* Rename table. Add docs.Erik Johnston2016-08-151-1/+1
|
* Use cached version of get_aliases_for_roomErik Johnston2016-08-151-1/+1
|
* Implement cache replication streamErik Johnston2016-08-152-2/+49
|
* Merge branch 'develop' of github.com:matrix-org/synapse into erikj/fed_readerErik Johnston2016-07-291-2/+5
|\
| * Create separate methods for getting messages to pushMark Haines2016-07-281-2/+5
| | | | | | | | | | | | | | | | | | | | | | for the email and http pushers rather than trying to make a single method that will work with their conflicting requirements. The http pusher needs to get the messages in ascending stream order, and doesn't want to miss a message. The email pusher needs to get the messages in descending timestamp order, and doesn't mind if it misses messages.
* | Add destination retry to slave storeErik Johnston2016-07-281-0/+30
| |
* | Add slace storage functions for public room listErik Johnston2016-07-282-0/+44
| |
* | Add get_auth_chain to slave storeErik Johnston2016-07-281-0/+4
| |
* | Add more key storage funcs into slave storeErik Johnston2016-07-281-6/+10
| |
* | Split out a FederationReader processErik Johnston2016-07-212-0/+34
|/
* pep8David Baker2016-06-241-1/+0
|
* Use similar naming we use in email notifs for pushDavid Baker2016-06-241-8/+0
| | | | Fixes https://github.com/vector-im/vector-web/issues/1654
* Remove event fetching from DB threadsErik Johnston2016-06-031-5/+0
|
* Merge pull request #827 from matrix-org/markjh/more_slaved_methodsMark Haines2016-06-033-6/+81
|\ | | | | Add methods to events, account data and receipt slaves
| * Add methods to events, account data and receipt slavesMark Haines2016-06-033-6/+81
| | | | | | | | | | Adds the methods needed by /sync to the slaved events, account data and receipt stores.
* | Merge pull request #824 from matrix-org/markjh/slaved_presence_storeMark Haines2016-06-031-0/+59
|\ \ | | | | | | Add a slaved store for presence
| * | Add a slaved store for presenceMark Haines2016-06-031-0/+59
| |/
* | Add a comment explaining why the filter cache doesn't need exipiringMark Haines2016-06-031-0/+1
| |
* | Add slaved stores for filters, tokens, and push rulesMark Haines2016-06-034-0/+151
|/
* Allow external processes to mark a user as syncing. (#812)Mark Haines2016-06-022-0/+61
| | | | | | | | | | | | * Add infrastructure to the presence handler to track sync requests in external processes * Expire stale entries for dead external processes * Add an http endpoint for making users as syncing Add some docstrings and comments. * Fixes
* Move typing handler out of the Handlers objectMark Haines2016-05-171-1/+1
|
* Move the presence handler out of the Handlers objectMark Haines2016-05-161-1/+1
|
* Assert that stream replicated stream positions are intsMark Haines2016-05-133-7/+7
|
* Merge branch 'develop' into dbkr/email_notifs_on_pusherMark Haines2016-05-133-1/+64
|\
| * Add a slaved datastore for account dataMark Haines2016-05-131-0/+61
| |
| * Log the stream IDs in an order that makes senseMark Haines2016-05-131-1/+1
| |
| * Make sure we advance our stream positionMark Haines2016-05-131-0/+2
| |
* | Shift some of the state_group methods into the SlavedEventStoreMark Haines2016-05-131-0/+19
|/
* Pass through get_events to pusher tooDavid Baker2016-05-101-0/+1
|
* Pass through _get_event_txnDavid Baker2016-05-101-0/+1
|
* Don't warnErik Johnston2016-05-051-2/+0
|
* Add some log information at returned replication streamsErik Johnston2016-05-051-0/+11
|
* Report per request metrics for all of the things using request_handlerMark Haines2016-04-282-2/+4
|
* Fix backfill replication to advance the stream correctlyMark Haines2016-04-272-3/+3
|
* Merge pull request #743 from matrix-org/markjh/slave_pushersMark Haines2016-04-211-0/+52
|\ | | | | Replicate the pushers
| * Replicate the pushersMark Haines2016-04-211-0/+52
| |
* | Merge pull request #744 from matrix-org/markjh/replication_remove_pusherMark Haines2016-04-212-3/+57
|\ \ | | | | | | Add a replication endpoint for deleting pushers
| * | Add a replication endpoint for deleting pushersMark Haines2016-04-212-3/+57
| |/
* / Replicate push actionsMark Haines2016-04-211-0/+14
|/
* Merge pull request #738 from matrix-org/markjh/slaved_receiptsMark Haines2016-04-191-0/+61
|\ | | | | Add a slaved receipts store
| * Add a slaved receipts storeMark Haines2016-04-191-0/+61
| |
* | Replicate get_invited_rooms_for_userMark Haines2016-04-191-2/+7
|/
* Add tests for redactionsMark Haines2016-04-071-2/+2
|
* Add tests for get_latest_event_ids_in_room and get_current_stateMark Haines2016-04-071-0/+5
|
* Test that room membership is replicatedMark Haines2016-04-061-3/+4
|
* Add a slaved events store classMark Haines2016-04-065-0/+284
| | | | | 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.
* Separate generating the replication response...Mark Haines2016-04-051-44/+55
| | | | | from doing the http request parsing to make it easier to write unit tests for replication.
* Merge pull request #676 from matrix-org/markjh/replicate_stateIIIMark Haines2016-03-311-3/+14
|\ | | | | Add replication streams for ex outliers and current state resets
| * Use a namedtuple rather than tuple unpackingMark Haines2016-03-311-10/+6
| |
| * Add replication streams for ex outliers and current state resetsMark Haines2016-03-301-1/+16
| |
* | typoMatthew Hodgson2016-03-301-1/+1
|/
* Add a replication stream for state groupsMark Haines2016-03-301-7/+29
|
* Add replication stream for pushersMark Haines2016-03-151-1/+24
|
* s/stream_ordering/event_stream_ordering/ in pushMark Haines2016-03-041-1/+1
|
* Hook push rules up to the replication APIMark Haines2016-03-021-2/+26
|
* Add a /replication API for extracting the updates that happened onMark Haines2016-03-012-0/+334
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.