cdb8036161 
								
									
								
							
								 
							
						 
						
							
							
								
								Add a config option for torture-testing worker replication. ( #4902 )  
							
							... 
							
							
							
							Setting this to 50 or so makes a bunch of sytests fail in worker mode. 
							
						 
						
							2019-03-20 16:04:35 +00:00  
				
					
						
							
							
								 
						
							
							
								b9f6163092 
								
							
								 
							
						 
						
							
							
								
								Simplify token replication logic  
							
							
							
						 
						
							2019-03-05 13:58:30 +00:00  
				
					
						
							
							
								 
						
							
							
								fe7bd23a85 
								
							
								 
							
						 
						
							
							
								
								Clean up logic and add comments  
							
							
							
						 
						
							2019-03-04 15:08:15 +00:00  
				
					
						
							
							
								 
						
							
							
								9f7cdf3da1 
								
							
								 
							
						 
						
							
							
								
								Clearer branching, fix missing list clear  
							
							
							
						 
						
							2019-03-04 14:36:52 +00:00  
				
					
						
							
							
								 
						
							
							
								5f0c449dd5 
								
							
								 
							
						 
						
							
							
								
								Prevent replication wedging  
							
							
							
						 
						
							2019-03-04 14:03:18 +00:00  
				
					
						
							
							
								 
						
							
							
								7590e9fa28 
								
									
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #4749  from matrix-org/erikj/replication_connection_backoff  
							
							... 
							
							
							
							Fix tightloop over connecting to replication server 
							
						 
						
							2019-02-27 11:00:59 +00:00  
				
					
						
							
							
								 
						
							
							
								6bb1c028f1 
								
							
								 
							
						 
						
							
							
								
								Limit cache invalidation replication line length ( #4748 )  
							
							
							
						 
						
							2019-02-27 10:28:37 +00:00  
				
					
						
							
							
								 
						
							
							
								6870fc496f 
								
							
								 
							
						 
						
							
							
								
								Move connecting logic into ClientReplicationStreamProtocol  
							
							
							
						 
						
							2019-02-27 10:23:51 +00:00  
				
					
						
							
							
								 
						
							
							
								25814921f1 
								
							
								 
							
						 
						
							
							
								
								Increase the max delay between retry attempts  
							
							... 
							
							
							
							Otherwise if you have many workers they can easily take out master with
their connection attempts 
							
						 
						
							2019-02-26 15:12:33 +00:00  
				
					
						
							
							
								 
						
							
							
								313987187e 
								
							
								 
							
						 
						
							
							
								
								Fix tightloop over connecting to replication server  
							
							... 
							
							
							
							If the client failed to process incoming commands during the initial set
up of the replication connection it would immediately disconnect and
reconnect, resulting in a tightloop.
This can happen, for example, when subscribing to a stream that has a
row that is too long in the backlog.
The fix here is to not consider the connection successfully set up until
the client has succesfully subscribed and caught up with the streams.
This ensures that the retry logic timers aren't reset until then,
meaning that if an error does happen during start up the client will
continue backing off before retrying again. 
							
						 
						
							2019-02-26 15:05:41 +00:00  
				
					
						
							
							
								 
						
							
							
								a163b748a5 
								
							
								 
							
						 
						
							
							
								
								Don't truncate command name in metrics  
							
							
							
						 
						
							2018-10-29 17:34:21 +00:00  
				
					
						
							
							
								 
						
							
							
								c4b3698a80 
								
									
								
							
								 
							
						 
						
							
							
								
								Make the replication logger quieter ( #4108 )  
							
							
							
						 
						
							2018-10-29 22:59:44 +11:00  
				
					
						
							
							
								 
						
							
							
								f1a7264663 
								
									
								
							
								 
							
						 
						
							
							
								
								Fix minor typo in exception  
							
							
							
						 
						
							2018-09-13 11:51:12 -06:00  
				
					
						
							
							
								 
						
							
							
								3e242dc149 
								
							
								 
							
						 
						
							
							
								
								Remove conn_id  
							
							
							
						 
						
							2018-09-04 11:45:52 +01:00  
				
					
						
							
							
								 
						
							
							
								b13836da7f 
								
							
								 
							
						 
						
							
							
								
								Remove conn_id from repl prometheus metrics  
							
							... 
							
							
							
							`conn_id` gets set to a random string, and so we end up filling up
prometheus with tonnes of data series, which is bad. 
							
						 
						
							2018-09-03 17:22:49 +01:00  
				
					
						
							
							
								 
						
							
							
								0e8d78f6aa 
								
							
								 
							
						 
						
							
							
								
								Logcontexts for replication command handlers  
							
							... 
							
							
							
							Run the handlers for replication commands as background processes. This should
improve the visibility in our metrics, and reduce the number of "running db
transaction from sentinel context" warnings.
Ideally it means converting the things that fire off deferreds into the night
into things that actually return a Deferred when they are done. I've made a bit
of a stab at this, but it will probably be leaky. 
							
						 
						
							2018-08-17 00:43:43 +01:00  
				
					
						
							
							
								 
						
							
							
								f59be4eb0e 
								
							
								 
							
						 
						
							
							
								
								Fix unit tests  
							
							... 
							
							
							
							on_notifier_poke no longer runs synchonously, so we have to do a different hack
to make sure that the replication data has been sent. Let's actually listen for
its arrival. 
							
						 
						
							2018-07-25 10:30:36 +01:00  
				
					
						
							
							
								 
						
							
							
								371da42ae4 
								
							
								 
							
						 
						
							
							
								
								Wrap a number of things that run in the background  
							
							... 
							
							
							
							This will reduce the number of "Starting db connection from sentinel context"
warnings, and will help with our metrics. 
							
						 
						
							2018-07-25 09:41:12 +01:00  
				
					
						
							
							
								 
						
							
							
								49af402019 
								
							
								 
							
						 
						
							
							
								
								run isort  
							
							
							
						 
						
							2018-07-09 16:09:20 +10:00  
				
					
						
							
							
								 
						
							
							
								6350bf925e 
								
									
								
							
								 
							
						 
						
							
							
								
								Attempt to be more performant on PyPy ( #3462 )  
							
							
							
						 
						
							2018-06-28 14:49:57 +01:00  
				
					
						
							
							
								 
						
							
							
								07cad26d65 
								
									
								
							
								 
							
						 
						
							
							
								
								Remove all global reactor imports & pass it around explicitly ( #3424 )  
							
							
							
						 
						
							2018-06-25 14:08:28 +01:00  
				
					
						
							
							
								 
						
							
							
								99b77aa829 
								
									
								
							
								 
							
						 
						
							
							
								
								Fix tcp protocol metrics naming ( #3410 )  
							
							
							
						 
						
							2018-06-21 09:39:27 +01:00  
				
					
						
							
							
								 
						
							
							
								b7e7fd2d0e 
								
							
								 
							
						 
						
							
							
								
								Fix replication metrics  
							
							... 
							
							
							
							fix bug introduced in #3256  
							
						 
						
							2018-06-04 16:23:05 +01:00  
				
					
						
							
							
								 
						
							
							
								754826a830 
								
							
								 
							
						 
						
							
							
								
								Merge remote-tracking branch 'origin/develop' into 3218-official-prom  
							
							
							
						 
						
							2018-05-28 18:57:23 +10:00  
				
					
						
							
							
								 
						
							
							
								1f69693347 
								
									
								
							
								 
							
						 
						
							
							
								
								Merge pull request  #3244  from NotAFile/py3-six-4  
							
							... 
							
							
							
							replace some iteritems with six 
							
						 
						
							2018-05-24 13:04:07 -05:00  
				
					
						
							
							
								 
						
							
							
								b6063631c3 
								
							
								 
							
						 
						
							
							
								
								more cleanup  
							
							
							
						 
						
							2018-05-22 17:36:20 -05:00  
				
					
						
							
							
								 
						
							
							
								228f1f584e 
								
							
								 
							
						 
						
							
							
								
								fix the test failures  
							
							
							
						 
						
							2018-05-22 15:02:38 -05:00  
				
					
						
							
							
								 
						
							
							
								8f5a688d42 
								
							
								 
							
						 
						
							
							
								
								cleanups, self-registration  
							
							
							
						 
						
							2018-05-22 10:56:03 -05:00  
				
					
						
							
							
								 
						
							
							
								a8990fa2ec 
								
							
								 
							
						 
						
							
							
								
								Merge remote-tracking branch 'origin/develop' into 3218-official-prom  
							
							
							
						 
						
							2018-05-22 10:50:26 -05:00  
				
					
						
							
							
								 
						
							
							
								9ea219c514 
								
							
								 
							
						 
						
							
							
								
								Send users a server notice about consent  
							
							... 
							
							
							
							When a user first syncs, we will send them a server notice asking them to
consent to the privacy policy if they have not already done so. 
							
						 
						
							2018-05-22 11:54:51 +01:00  
				
					
						
							
							
								 
						
							
							
								fcc525b0b7 
								
							
								 
							
						 
						
							
							
								
								rest of the changes  
							
							
							
						 
						
							2018-05-21 19:48:57 -05:00  
				
					
						
							
							
								 
						
							
							
								df9f72d9e5 
								
							
								 
							
						 
						
							
							
								
								replacing portions  
							
							
							
						 
						
							2018-05-21 19:47:37 -05:00  
				
					
						
							
							
								 
						
							
							
								933bf2dd35 
								
							
								 
							
						 
						
							
							
								
								replace some iteritems with six  
							
							... 
							
							
							
							Signed-off-by: Adrian Tschira <nota@notafile.com> 
							
						 
						
							2018-05-19 17:59:26 +02:00  
				
					
						
							
							
								 
						
							
							
								57b58e2174 
								
							
								 
							
						 
						
							
							
								
								make imports local  
							
							... 
							
							
							
							Signed-off-by: Adrian Tschira <nota@notafile.com> 
							
						 
						
							2018-04-28 13:41:41 +02:00  
				
					
						
							
							
								 
						
							
							
								3ee4ad09eb 
								
							
								 
							
						 
						
							
							
								
								Fix json encoding bug in replication  
							
							... 
							
							
							
							json encoders have an encode method, not a dumps method. 
							
						 
						
							2018-04-03 15:09:48 +01:00  
				
					
						
							
							
								 
						
							
							
								05630758f2 
								
							
								 
							
						 
						
							
							
								
								Use static JSONEncoders  
							
							... 
							
							
							
							using json.dumps with custom options requires us to create a new JSONEncoder on
each call. It's more efficient to create one upfront and reuse it. 
							
						 
						
							2018-03-29 23:13:33 +01:00  
				
					
						
							
							
								 
						
							
							
								9aa5a0af51 
								
							
								 
							
						 
						
							
							
								
								Explicitly use simplejson  
							
							
							
						 
						
							2018-03-20 09:58:13 +00:00  
				
					
						
							
							
								 
						
							
							
								610accbb7f 
								
							
								 
							
						 
						
							
							
								
								Fix replication after switch to simplejson  
							
							... 
							
							
							
							Turns out that simplejson serialises namedtuple's as dictionaries rather
than tuples by default. 
							
						 
						
							2018-03-19 16:12:48 +00:00  
				
					
						
							
							
								 
						
							
							
								fa72803490 
								
							
								 
							
						 
						
							
							
								
								Merge branch 'master' of github.com:matrix-org/synapse into develop  
							
							
							
						 
						
							2018-03-19 11:41:01 +00:00  
				
					
						
							
							
								 
						
							
							
								926ba76e23 
								
							
								 
							
						 
						
							
							
								
								Replace ujson with simplejson  
							
							
							
						 
						
							2018-03-15 23:43:31 +00:00  
				
					
						
							
							
								 
						
							
							
								5c3c32f16f 
								
							
								 
							
						 
						
							
							
								
								Metrics for number of RDATA commands received  
							
							... 
							
							
							
							I found myself wishing we had this. 
							
						 
						
							2018-01-15 17:45:55 +00:00  
				
					
						
							
							
								 
						
							
							
								0edf085b68 
								
							
								 
							
						 
						
							
							
								
								Fix some logcontext leaks in replication resource  
							
							... 
							
							
							
							The @measure_func annotations rely on the wrapped function respecting the
logcontext rules. Add the necessary yields to make this work. 
							
						 
						
							2017-11-23 23:19:43 +00:00  
				
					
						
							
							
								 
						
							
							
								eaaabc6c4f 
								
							
								 
							
						 
						
							
							
								
								replace 'except:' with 'except Exception:'  
							
							... 
							
							
							
							what could possibly go wrong 
							
						 
						
							2017-10-23 15:52:32 +01:00  
				
					
						
							
							
								 
						
							
							
								f807f7f804 
								
							
								 
							
						 
						
							
							
								
								log when we get an exception handling replication updates  
							
							
							
						 
						
							2017-10-12 11:51:24 +01:00  
				
					
						
							
							
								 
						
							
							
								2cc998fed8 
								
							
								 
							
						 
						
							
							
								
								Fix replication. And notify  
							
							
							
						 
						
							2017-07-20 17:13:18 +01:00  
				
					
						
							
							
								 
						
							
							
								925b3638ff 
								
							
								 
							
						 
						
							
							
								
								Reduce log levels in tcp replication  
							
							
							
						 
						
							2017-07-11 10:04:21 +01:00  
				
					
						
							
							
								 
						
							
							
								27f26e48b7 
								
							
								 
							
						 
						
							
							
								
								Serialize user ip command as json  
							
							
							
						 
						
							2017-06-27 16:25:38 +01:00  
				
					
						
							
							
								 
						
							
							
								78cefd78d6 
								
							
								 
							
						 
						
							
							
								
								Make workers report to master for user ip updates  
							
							
							
						 
						
							2017-06-27 14:58:10 +01:00  
				
					
						
							
							
								 
						
							
							
								6aa5bc8635 
								
							
								 
							
						 
						
							
							
								
								Initial worker impl  
							
							
							
						 
						
							2017-06-16 11:47:11 +01:00  
				
					
						
							
							
								 
						
							
							
								2cac7623a5 
								
							
								 
							
						 
						
							
							
								
								Add missing notifier  
							
							
							
						 
						
							2017-06-09 11:24:41 +01:00