Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Split out federation transaction sending to a worker #1635

Merged
merged 22 commits into from Nov 23, 2016

Conversation

Projects
None yet
2 participants
Owner

erikjohnston commented Nov 21, 2016 edited

No description provided.

erikjohnston added some commits Nov 4, 2016

@erikjohnston erikjohnston changed the title from Erikj/split out fed txn to Split out federation transaction sending to a worker Nov 21, 2016

erikjohnston added some commits Nov 21, 2016

synapse/federation/send_queue.py
+
+ # There should be only one reader, so lets delete everything its
+ # acknowledged its seen.
+ self._clear_queue_before_pos(token)
@NegativeMjark

NegativeMjark Nov 21, 2016

Contributor

Might be worth trying to use a separate parameter for controlling the acks. For example there's a script in scripts-dev that tails all replication rows, if you ran it againtst synapse it might inadvertently delete all the federation queues. That could be awkward.

If you used a separate parameter for acknowledging like ack_federation or something and didn't report it in the list of streams then I don't think this would be such a problem.

Although it might be that case that we are better off not exposing the federation in the list of streams.

+ else:
+ self.edus[pos] = edu
+
+ def send_presence(self, destination, states):
@NegativeMjark

NegativeMjark Nov 21, 2016

Contributor

I wonder if we send lots of identical messages to multiple dests. I wonder if it might be possible to reduce the duplication here if that is the case.

@erikjohnston

erikjohnston Nov 23, 2016

Owner

Probably, but I think that can be dealt with later if necessary.

erikjohnston added some commits Nov 22, 2016

@erikjohnston erikjohnston merged commit 302fbd2 into develop Nov 23, 2016

8 of 10 checks passed

Sytest SQLite (Commit) Build #2035 origin/erikj/split_out_fed_txn failed in 8 min 50 sec
Details
Sytest Dendron (Merged PR) Build finished.
Details
Flake8 + Packaging (Commit) Build #2086 origin/erikj/split_out_fed_txn succeeded in 40 sec
Details
Flake8 + Packaging (Merged PR) Build finished.
Details
Sytest Dendron (Commit) Build #1152 origin/erikj/split_out_fed_txn succeeded in 10 min
Details
Sytest Postgres (Commit) Build #1989 origin/erikj/split_out_fed_txn succeeded in 6 min 50 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Merged PR) Build finished.
Details
Unit Tests (Commit) Build #2117 origin/erikj/split_out_fed_txn succeeded in 2 min 18 sec
Details
Unit Tests (Merged PR) Build finished.
Details

@richvdh richvdh deleted the erikj/split_out_fed_txn branch Dec 1, 2016

NegativeMjark added a commit that referenced this pull request Jan 5, 2017

Only send events that originate on this server.
Or events that are sent via the federation "send_join" API.

This should match the behaviour from before v0.18.5 and #1635 landed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment