Skip to content
Snippets Groups Projects
Unverified Commit 3fd68d53 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Merge pull request #3914 from matrix-org/erikj/remove_retry_cache

Remove get_destination_retry_timings cache
parents 741571cf bbab6ebf
No related branches found
No related tags found
No related merge requests found
Fix bug where outbound federation would stop talking to some servers when using workers
...@@ -23,7 +23,6 @@ from canonicaljson import encode_canonical_json ...@@ -23,7 +23,6 @@ from canonicaljson import encode_canonical_json
from twisted.internet import defer from twisted.internet import defer
from synapse.metrics.background_process_metrics import run_as_background_process from synapse.metrics.background_process_metrics import run_as_background_process
from synapse.util.caches.descriptors import cached
from ._base import SQLBaseStore, db_to_json from ._base import SQLBaseStore, db_to_json
...@@ -156,7 +155,6 @@ class TransactionStore(SQLBaseStore): ...@@ -156,7 +155,6 @@ class TransactionStore(SQLBaseStore):
""" """
pass pass
@cached(max_entries=10000)
def get_destination_retry_timings(self, destination): def get_destination_retry_timings(self, destination):
"""Gets the current retry timings (if any) for a given destination. """Gets the current retry timings (if any) for a given destination.
...@@ -198,8 +196,6 @@ class TransactionStore(SQLBaseStore): ...@@ -198,8 +196,6 @@ class TransactionStore(SQLBaseStore):
retry_interval (int) - how long until next retry in ms retry_interval (int) - how long until next retry in ms
""" """
# XXX: we could chose to not bother persisting this if our cache thinks
# this is a NOOP
return self.runInteraction( return self.runInteraction(
"set_destination_retry_timings", "set_destination_retry_timings",
self._set_destination_retry_timings, self._set_destination_retry_timings,
...@@ -212,10 +208,6 @@ class TransactionStore(SQLBaseStore): ...@@ -212,10 +208,6 @@ class TransactionStore(SQLBaseStore):
retry_last_ts, retry_interval): retry_last_ts, retry_interval):
self.database_engine.lock_table(txn, "destinations") self.database_engine.lock_table(txn, "destinations")
self._invalidate_cache_and_stream(
txn, self.get_destination_retry_timings, (destination,)
)
# We need to be careful here as the data may have changed from under us # We need to be careful here as the data may have changed from under us
# due to a worker setting the timings. # due to a worker setting the timings.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment