summary refs log tree commit diff
path: root/synapse/replication/slave/storage/events.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge/remove `Slaved*` stores into `WorkerStores` (#14375)Nick Mills-Barrett2022-11-111-79/+0
|
* Use cache store remove base slaved (#13329)Nick Mills-Barrett2022-07-211-3/+0
| | | This comes from two identical definitions in each of the base stores, and means the base slaved store is now empty and can be removed.
* Stop reading from `event_reference_hashes` (#11794)Richard van der Hoff2022-01-211-1/+1
| | | | Preparation for dropping this table altogether. Part of #6574.
* Remove redundant `get_current_events_token` (#11643)Richard van der Hoff2022-01-041-9/+0
| | | | | | | | | | | | | | | | | * Push `get_room_{min,max_stream_ordering}` into StreamStore Both implementations of this are identical, so we may as well push it down and get rid of the abstract base class nonsense. * Remove redundant `StreamStore` class This is empty now * Remove redundant `get_current_events_token` This was an exact duplicate of `get_room_max_stream_ordering`, so let's get rid of it. * newsfile
* Type hint the constructors of the data store classes (#11555)Sean Quah2021-12-131-2/+7
|
* Add type hints for most `HomeServer` parameters (#11095)Sean Quah2021-10-221-1/+5
|
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-181-1/+1
| | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-12/+12
|
* Move event stream handling out of slave store. (#7491)Erik Johnston2020-05-151-89/+0
| | | | | This allows us to have the logic on both master and workers, which is necessary to move event persistence off master. We also combine the instantiation of ID generators from DataStore and slave stores to the base worker stores. This allows us to select which process writes events independently of the master/worker splits.
* Support any process writing to cache invalidation stream. (#7436)Erik Johnston2020-05-071-4/+2
|
* Use `stream.current_token()` and remove `stream_positions()` (#7172)Erik Johnston2020-05-011-6/+0
| | | | We move the processing of typing and federation replication traffic into their handlers so that `Stream.current_token()` points to a valid token. This allows us to remove `get_streams_to_replicate()` and `stream_positions()`.
* Merge worker apps into one. (#6964)Erik Johnston2020-02-251-0/+20
|
* Add `local_current_membership` table (#6655)Erik Johnston2020-01-151-1/+1
| | | | | | | Currently we rely on `current_state_events` to figure out what rooms a user was in and their last membership event in there. However, if the server leaves the room then the table may be cleaned up and that information is lost. So lets add a table that separately holds that information.
* Change DataStores to accept 'database' param.Erik Johnston2019-12-061-2/+3
|
* Move storage classes into a main "data store".Erik Johnston2019-10-211-9/+11
| | | | | This is in preparation for having multiple data stores that offer different functionality, e.g. splitting out state or event storage.
* Run Black. (#5482)Amber Brown2019-06-201-33/+44
|
* Fixup bsaed on review commentsErik Johnston2019-05-171-1/+1
|
* Add basic editing supportErik Johnston2019-05-161-0/+1
|
* Fix relations in worker modeErik Johnston2019-05-161-3/+10
|
* Fix sync bug when accepting invites (#4956)Richard van der Hoff2019-04-021-9/+22
| | | | | | | | | | Hopefully this time we really will fix #4422. We need to make sure that the cache on `get_rooms_for_user_with_stream_ordering` is invalidated *before* the SyncHandler is notified for the new events, and we can now do so reliably via the `events` stream.
* Make EventStream rows have a typeRichard van der Hoff2019-03-271-2/+6
| | | | ... as a precursor to combining it with the CurrentStateDelta stream.
* Basic support for room versioningRichard van der Hoff2018-08-031-1/+1
| | | | | | | | This is the first tranche of support for room versioning. It includes: * setting the default room version in the config file * new room_version param on the createRoom API * storing the version of newly-created rooms in the m.room.create event * fishing the version of existing rooms out of the m.room.create event
* run isortAmber Brown2018-07-091-1/+2
|
* Add UserErasureWorkerStore to workersErik Johnston2018-06-251-0/+2
|
* Remove unused DataStoreErik Johnston2018-03-011-1/+0
|
* Merge branch 'develop' of github.com:matrix-org/synapse into erikj/split_sig_fedErik Johnston2018-03-011-48/+7
|\
| * Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-03-011-2/+0
| |\ | | | | | | | | | erikj/split_stream_store
| | * Calculate stream_ordering_month_ago correctly on workersErik Johnston2018-03-011-1/+0
| | |
| * | Split out stream storeErik Johnston2018-03-011-45/+9
| |/
* / Split out SignatureStore and EventFederationStoreErik Johnston2018-03-011-42/+8
|/
* Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-02-231-22/+6
|\ | | | | | | erikj/split_roommember_store
| * Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-02-231-12/+4
| |\ | | | | | | | | | erikj/split_event_push_actions
| | * Split EventsWorkerStore into separate fileErik Johnston2018-02-231-1/+1
| | |
| | * Update copyrightErik Johnston2018-02-231-0/+1
| | |
| * | Split out EventPushActionWorkerStoreErik Johnston2018-02-211-20/+3
| | |
* | | Update copyrightErik Johnston2018-02-231-0/+1
| | |
* | | Split out RoomMemberStoreErik Johnston2018-02-211-27/+3
| |/ |/|
* | Split out get_events and co into a worker storeErik Johnston2018-02-211-11/+2
|/
* Add event_creator workerErik Johnston2018-02-071-0/+20
|
* Store state groups separately from events (#2784)Erik Johnston2018-02-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Pull out bits of StateStore to a mixinRichard van der Hoff2017-11-141-33/+6
| | | | | | | | | ... so that we don't need to secretly gut-wrench it for use in the slaved stores. I haven't done the other stores yet, but we should. I'm tired of the workers breaking every time we tweak the stores because I forgot to gut-wrench the right method. fixes https://github.com/matrix-org/synapse/issues/2655.
* Add cache for is_host_joinedErik Johnston2017-06-131-1/+1
|
* Merge pull request #2266 from matrix-org/erikj/host_in_roomErik Johnston2017-06-121-1/+0
|\ | | | | Change is_host_joined to use current_state table
| * Fix replicationErik Johnston2017-06-091-1/+0
| |
* | Fix replicationErik Johnston2017-06-091-1/+1
|/
* Faster cache for get_joined_hostsErik Johnston2017-05-251-0/+2
|
* Add new storage functions to slave storeErik Johnston2017-05-041-0/+3
|
* Remove unused cacheErik Johnston2017-04-241-3/+0
|
* 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.
* Change slave storage to use new replication interfaceErik Johnston2017-04-031-40/+17
| | | | | | | As the TCP replication uses a slightly different API and streams than the HTTP replication. This breaks HTTP replication.
* 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-171-28/+14
|
* Add new storage function to slave storeErik Johnston2017-03-131-0/+4
|
* Aggregate event push actionsErik Johnston2017-02-141-0/+6
|
* Fix replicationErik Johnston2017-02-021-0/+3
|
* Only invalidate membership caches based on the cache streamErik Johnston2017-01-311-16/+5
| | | | | Before we completely invalidated get_users_in_room whenever we updated any current_state_events table. This was way too aggressive.
* Insert delta of current_state_events to be more efficientErik Johnston2017-01-201-10/+0
|
* Store federation stream positions in the databaseErik Johnston2016-11-211-0/+3
|
* Handle sending events and device messages over federationErik Johnston2016-11-171-0/+11
|
* 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-151-0/+8
|
* Add upgrade script that will slowly prune state_groups_state entriesErik Johnston2016-09-051-0/+3
|
* Add storage function to SlaveStoreErik Johnston2016-08-311-0/+1
|
* 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 is_host_joined to slave storageErik Johnston2016-08-261-0/+2
|
* Add new state storage funcs to replicationErik Johnston2016-08-261-0/+3
|
* 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 get_auth_chain to slave storeErik Johnston2016-07-281-0/+4
| |
* | Split out a FederationReader processErik Johnston2016-07-211-0/+5
|/
* 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
|
* Add methods to events, account data and receipt slavesMark Haines2016-06-031-4/+17
| | | | | Adds the methods needed by /sync to the slaved events, account data and receipt stores.
* Assert that stream replicated stream positions are intsMark Haines2016-05-131-4/+4
|
* Merge branch 'develop' into dbkr/email_notifs_on_pusherMark Haines2016-05-131-0/+2
|\
| * 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
|
* Fix backfill replication to advance the stream correctlyMark Haines2016-04-271-2/+2
|
* Replicate push actionsMark Haines2016-04-211-0/+14
|
* 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-061-0/+198
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.