-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
GenericWorkerReplicationHandler has no attribute 'send_federation_ack' #7535
Comments
@erikjohnston I think that #7185 could have caused this. |
Huh. This is on the full 1.13 release? I've seen it before, but didn't see it on matrix.org so assumed everything was fine, at least where the release was concerned. The net effect of this is that master will slowly leak some memory btw. |
Yes, when I deployed the config to set up workers the pip update also pulled the new 1.13.0. |
This seems to solve it. Feels like a hack, though. diff --git i/synapse/app/generic_worker.py w/synapse/app/generic_worker.py
index 667ad2042..d36699b00 100644
--- i/synapse/app/generic_worker.py
+++ w/synapse/app/generic_worker.py
@@ -765,6 +765,7 @@ class FederationSenderHandler(object):
self._is_mine_id = hs.is_mine_id
self.federation_sender = hs.get_federation_sender()
self.replication_client = replication_client
+ self.hs = hs
self.federation_position = self.store.federation_out_pos_startup
self._fed_position_linearizer = Linearizer(name="_fed_position_linearizer")
@@ -848,7 +849,7 @@ class FederationSenderHandler(object):
# We ACK this token over replication so that the master can drop
# its in memory queues
- self.replication_client.send_federation_ack(
+ self.hs.get_tcp_replication().send_federation_ack(
self.federation_position
)
self._last_ack = self.federation_position |
I've investigated this a bit more. @heftig's workaround is valid. It's a little bit hacky, but the problem is that doing it in the non-hacky way introduces a dependency cycle ( A cleaner fix might be to invert the dependency between As for why this isn't happening on The Let's say that we process up to stream id 10000; then the whole system is restarted. The intention with the federation stream is that the stream ids restart on each restart of the master, so now stream ids go back to zero. At this point, in the following code, synapse/synapse/app/generic_worker.py Lines 844 to 854 in 0e719f2
Other than the lack of exceptions, I think the effects are:
It looks like the In summary: we should do what @heftig said, and remove the condition at line 844. But also: I'm annoyed that this didn't get picked up by any tests. It actually looks like federation acks have been broken on matrix.org for months: we should have been able to detect both problems if we had checks that the federation_sender worker was sending back Given the (lack of) severity of the symptoms here, I don't feel like this is worth a patch release to fix. |
Description
I'm trying to use the
federation_sender
worker. I made these changes to the homeserver config:The log shows this error, frequently:
Version information
The text was updated successfully, but these errors were encountered: