Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Remove get_destination_retry_timings cache #3914

Merged
merged 4 commits into from
Sep 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/3914.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug where outbound federation would stop talking to some servers when using workers
8 changes: 0 additions & 8 deletions synapse/storage/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from twisted.internet import defer

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

Expand Down Expand Up @@ -156,7 +155,6 @@ def delivered_txn(self, transaction_id, destination, code, response_dict):
"""
pass

@cached(max_entries=10000)
def get_destination_retry_timings(self, destination):
"""Gets the current retry timings (if any) for a given destination.

Expand Down Expand Up @@ -198,8 +196,6 @@ def set_destination_retry_timings(self, destination,
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(
"set_destination_retry_timings",
self._set_destination_retry_timings,
Expand All @@ -212,10 +208,6 @@ def _set_destination_retry_timings(self, txn, destination,
retry_last_ts, retry_interval):
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
# due to a worker setting the timings.

Expand Down