Erik Johnston
							
						 
						
							 
							
							
							
								
							
								c66a06ac6b 
								
							
								 
							
						 
						
							
							
								
								Move storage classes into a main "data store".  
							
							 
							
							... 
							
							
							
							This is in preparation for having multiple data stores that offer
different functionality, e.g. splitting out state or event storage. 
							
						 
						
							2019-10-21 16:05:06 +01:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								b161786c14 
								
							
								 
							
						 
						
							
							
								
								Replace IN usage with helper funcs  
							
							 
							
							
							
						 
						
							2019-10-10 13:15:49 +01:00  
						
					 
				
					
						
							
							
								 
								Andrew Morgan
							
						 
						
							 
							
							
								
								
							
							
								
							
								4548d1f87e 
								
									
								
							
								 
							
						 
						
							
							
								
								Remove unnecessary parentheses around return statements  ( #5931 )  
							
							 
							
							... 
							
							
							
							Python will return a tuple whether there are parentheses around the returned values or not.
I'm just sick of my editor complaining about this all over the place :) 
							
						 
						
							2019-08-30 16:28:26 +01:00  
						
					 
				
					
						
							
							
								 
								Amber Brown
							
						 
						
							 
							
							
								
								
							
							
								
							
								4806651744 
								
									
								
							
								 
							
						 
						
							
							
								
								Replace returnValue with return ( #5736 )  
							
							 
							
							
							
						 
						
							2019-07-23 23:00:55 +10:00  
						
					 
				
					
						
							
							
								 
								Neil Johnson
							
						 
						
							 
							
							
								
								
							
							
								
							
								e8419554ff 
								
									
								
							
								 
							
						 
						
							
							
								
								Remove presence lists ( #4989 )  
							
							 
							
							... 
							
							
							
							Remove presence list support as per MSC 1819 
							
						 
						
							2019-04-03 11:11:15 +01:00  
						
					 
				
					
						
							
							
								 
								Amber Brown
							
						 
						
							 
							
							
							
								
							
								7efd1d87c2 
								
							
								 
							
						 
						
							
							
								
								Run black on the rest of the storage module ( #4996 )  
							
							 
							
							
							
						 
						
							2019-04-03 10:07:29 +01:00  
						
					 
				
					
						
							
							
								 
								Amber Brown
							
						 
						
							 
							
							
							
								
							
								49af402019 
								
							
								 
							
						 
						
							
							
								
								run isort  
							
							 
							
							
							
						 
						
							2018-07-09 16:09:20 +10:00  
						
					 
				
					
						
							
							
								 
								Amber Brown
							
						 
						
							 
							
							
								
								
							
							
								
							
								c936a52a9e 
								
									
								
							
								 
							
						 
						
							
							
								
								Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy ( #3307 )  
							
							 
							
							
							
						 
						
							2018-05-31 19:03:47 +10:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								987f4945b4 
								
							
								 
							
						 
						
							
							
								
								Actually call invalidate  
							
							 
							
							
							
						 
						
							2017-03-24 13:28:20 +00:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								09f79aaad0 
								
							
								 
							
						 
						
							
							
								
								Use presence replication stream to invalidate cache  
							
							 
							
							... 
							
							
							
							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. 
							
						 
						
							2017-03-24 13:21:08 +00:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								9e617cd4c2 
								
							
								 
							
						 
						
							
							
								
								Cache get_presence storage  
							
							 
							
							
							
						 
						
							2017-02-13 13:50:03 +00:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								ed787cf09e 
								
							
								 
							
						 
						
							
							
								
								Hook up the send queue and create a federation sender worker  
							
							 
							
							
							
						 
						
							2016-11-16 17:34:44 +00:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								4d70d1f80e 
								
							
								 
							
						 
						
							
							
								
								Add some invalidations to a cache_stream  
							
							 
							
							
							
						 
						
							2016-08-15 11:15:17 +01:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								1a815fb04f 
								
							
								 
							
						 
						
							
							
								
								Don't hit DB for noop replications queries  
							
							 
							
							
							
						 
						
							2016-06-08 11:33:30 +01:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								42368ea8db 
								
							
								 
							
						 
						
							
							
								
								Add desc to get_presence_for_users  
							
							 
							
							
							
						 
						
							2016-05-18 11:38:10 +01:00  
						
					 
				
					
						
							
							
								 
								Mark Haines
							
						 
						
							 
							
							
							
								
							
								7e2f971c08 
								
							
								 
							
						 
						
							
							
								
								Remove some unused functions ( #711 )  
							
							 
							
							... 
							
							
							
							* Remove some unused functions
* get_room_events_stream is only used in tests
* is_exclusive_room might actually be something we want 
							
						 
						
							2016-04-08 14:01:56 +01:00  
						
					 
				
					
						
							
							
								 
								Mark Haines
							
						 
						
							 
							
							
							
								
							
								e36bfbab38 
								
							
								 
							
						 
						
							
							
								
								Use a stream id generator for backfilled ids  
							
							 
							
							
							
						 
						
							2016-04-01 13:29:05 +01:00  
						
					 
				
					
						
							
							
								 
								Mark Haines
							
						 
						
							 
							
							
							
								
							
								a612ce6659 
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #489  from matrix-org/markjh/replication  
							
							 
							
							... 
							
							
							
							Add a /replication API for extracting the updates that happened on synapse. 
							
						 
						
							2016-03-01 15:08:24 +00:00  
						
					 
				
					
						
							
							
								 
								Mark Haines
							
						 
						
							 
							
							
							
								
							
								60a0f81c7a 
								
							
								 
							
						 
						
							
							
								
								Add a /replication API for extracting the updates that happened on  
							
							 
							
							... 
							
							
							
							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. 
							
						 
						
							2016-03-01 14:49:41 +00:00  
						
					 
				
					
						
							
							
								 
								Mark Haines
							
						 
						
							 
							
							
							
								
							
								54172924c8 
								
							
								 
							
						 
						
							
							
								
								Load the current id in the IdGenerator constructor  
							
							 
							
							... 
							
							
							
							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. 
							
						 
						
							2016-03-01 14:32:56 +00:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								6451fcd085 
								
							
								 
							
						 
						
							
							
								
								Create a new stream_id per presence update  
							
							 
							
							
							
						 
						
							2016-02-23 15:51:39 +00:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								112283e230 
								
							
								 
							
						 
						
							
							
								
								Prefix TS fields with _ts  
							
							 
							
							
							
						 
						
							2016-02-18 10:11:43 +00:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								e5999bfb1a 
								
							
								 
							
						 
						
							
							
								
								Initial cut  
							
							 
							
							
							
						 
						
							2016-02-17 15:40:50 +00:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								2c1fbea531 
								
							
								 
							
						 
						
							
							
								
								Fix up logcontexts  
							
							 
							
							
							
						 
						
							2016-02-08 14:26:45 +00:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								ddd25def01 
								
							
								 
							
						 
						
							
							
								
								Implement a _simple_select_many_batch  
							
							 
							
							
							
						 
						
							2016-01-25 13:36:02 +00:00  
						
					 
				
					
						
							
							
								 
								Matthew Hodgson
							
						 
						
							 
							
							
							
								
							
								6c28ac260c 
								
							
								 
							
						 
						
							
							
								
								copyrights  
							
							 
							
							
							
						 
						
							2016-01-07 04:26:29 +00:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								128ed32e6b 
								
							
								 
							
						 
						
							
							
								
								Bump size of get_presence_state cache  
							
							 
							
							
							
						 
						
							2015-08-18 15:51:23 +01:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								2d97e65558 
								
							
								 
							
						 
						
							
							
								
								Remember to invalidate caches  
							
							 
							
							
							
						 
						
							2015-08-17 10:46:55 +01:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								1a9510bb84 
								
							
								 
							
						 
						
							
							
								
								Implement a batched presence_handler.get_state and use it  
							
							 
							
							
							
						 
						
							2015-08-17 10:40:23 +01:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								47abebfd6d 
								
							
								 
							
						 
						
							
							
								
								Add batched version of store.get_presence_state  
							
							 
							
							
							
						 
						
							2015-08-17 09:50:50 +01:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								2df8dd9b37 
								
							
								 
							
						 
						
							
							
								
								Move all the caches into their own package, synapse.util.caches  
							
							 
							
							
							
						 
						
							2015-08-11 18:00:59 +01:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								b8e386db59 
								
							
								 
							
						 
						
							
							
								
								Change Cache to not use *args in its interface  
							
							 
							
							
							
						 
						
							2015-08-07 11:52:21 +01:00  
						
					 
				
					
						
							
							
								 
								Mark Haines
							
						 
						
							 
							
							
							
								
							
								1a9a9abcc7 
								
							
								 
							
						 
						
							
							
								
								Add a cache for getting the presence list for a user  
							
							 
							
							
							
						 
						
							2015-05-22 16:11:17 +01:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								c8d3f6486d 
								
							
								 
							
						 
						
							
							
								
								Implement or_ignore flag on inserts  
							
							 
							
							
							
						 
						
							2015-04-07 12:06:22 +01:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								dc0c989ef4 
								
							
								 
							
						 
						
							
							
								
								Give sensible names for '_simple_...' transactions  
							
							 
							
							
							
						 
						
							2015-03-20 15:59:18 +00:00  
						
					 
				
					
						
							
							
								 
								Erik Johnston
							
						 
						
							 
							
							
							
								
							
								7e282a53a5 
								
							
								 
							
						 
						
							
							
								
								Tidy up _simple_... methods  
							
							 
							
							
							
						 
						
							2015-03-20 15:05:10 +00:00  
						
					 
				
					
						
							
							
								 
								Mark Haines
							
						 
						
							 
							
							
							
								
							
								adb04b1e57 
								
							
								 
							
						 
						
							
							
								
								Update copyright notices  
							
							 
							
							
							
						 
						
							2015-01-06 13:21:39 +00:00  
						
					 
				
					
						
							
							
								 
								Matthew Hodgson
							
						 
						
							 
							
							
							
								
							
								8a7c1d6a00 
								
							
								 
							
						 
						
							
							
								
								fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org hasn't been incorporated in time for launch.  
							
							 
							
							
							
						 
						
							2014-09-03 17:31:57 +01:00  
						
					 
				
					
						
							
							
								 
								Matthew Hodgson
							
						 
						
							 
							
							
							
								
							
								0f9b633af7 
								
							
								 
							
						 
						
							
							
								
								retcols is mandatory. i have no idea how this could ever have worked?  
							
							 
							
							
							
						 
						
							2014-08-16 01:46:35 +01:00  
						
					 
				
					
						
							
							
								 
								Paul "LeoNerd" Evans
							
						 
						
							 
							
							
							
								
							
								d05aa651f8 
								
							
								 
							
						 
						
							
							
								
								An initial hack at storing presence state-change mtimes in database and presenting age durations to clients/federation events  
							
							 
							
							
							
						 
						
							2014-08-13 19:19:15 +01:00  
						
					 
				
					
						
							
							
								 
								Matthew Hodgson
							
						 
						
							 
							
							
							
								
							
								f98e6380f1 
								
							
								 
							
						 
						
							
							
								
								add in whitespace after copyright statements to improve legibility  
							
							 
							
							
							
						 
						
							2014-08-13 03:14:34 +01:00  
						
					 
				
					
						
							
							
								 
								matrix.org
							
						 
						
							 
							
							
							
								
							
								4f475c7697 
								
							
								 
							
						 
						
							
							
								
								Reference Matrix Home Server  
							
							 
							
							
							
						 
						
							2014-08-12 15:10:52 +01:00