mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 01:04:48 -04:00
Don't go into federation catch up mode so easily (#9561)
Federation catch up mode is very inefficient if the number of events that the remote server has missed is small, since handling gaps can be very expensive, c.f. #9492. Instead of going into catch up mode whenever we see an error, we instead do so only if we've backed off from trying the remote for more than an hour (the assumption being that in such a case it is more than a transient failure).
This commit is contained in:
parent
af2248f8bf
commit
026503fa3b
5 changed files with 189 additions and 158 deletions
|
@ -350,11 +350,11 @@ class TransactionStore(TransactionWorkerStore):
|
|||
|
||||
self.db_pool.simple_upsert_many_txn(
|
||||
txn,
|
||||
"destination_rooms",
|
||||
["destination", "room_id"],
|
||||
rows,
|
||||
["stream_ordering"],
|
||||
[(stream_ordering,)] * len(rows),
|
||||
table="destination_rooms",
|
||||
key_names=("destination", "room_id"),
|
||||
key_values=rows,
|
||||
value_names=["stream_ordering"],
|
||||
value_values=[(stream_ordering,)] * len(rows),
|
||||
)
|
||||
|
||||
async def get_destination_last_successful_stream_ordering(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue