Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
6707a321
Commit
6707a321
authored
6 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Limit the number of PDUs/EDUs per fedreation transaction
parent
2608ebc0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/federation/transaction_queue.py
+12
-0
12 additions, 0 deletions
synapse/federation/transaction_queue.py
with
12 additions
and
0 deletions
synapse/federation/transaction_queue.py
+
12
−
0
View file @
6707a321
...
@@ -463,7 +463,19 @@ class TransactionQueue(object):
...
@@ -463,7 +463,19 @@ class TransactionQueue(object):
# pending_transactions flag.
# pending_transactions flag.
pending_pdus
=
self
.
pending_pdus_by_dest
.
pop
(
destination
,
[])
pending_pdus
=
self
.
pending_pdus_by_dest
.
pop
(
destination
,
[])
# We can only include at most 50 PDUs per transactions
pending_pdus
,
leftover_pdus
=
pending_pdus
[:
50
],
pending_pdus
[
50
:]
if
leftover_pdus
:
self
.
pending_pdus_by_dest
[
destination
]
=
leftover_pdus
pending_edus
=
self
.
pending_edus_by_dest
.
pop
(
destination
,
[])
pending_edus
=
self
.
pending_edus_by_dest
.
pop
(
destination
,
[])
# We can only include at most 100 EDUs per transactions
pending_edus
,
leftover_edus
=
pending_edus
[:
100
],
pending_edus
[
100
:]
if
leftover_edus
:
self
.
pending_edus_by_dest
[
destination
]
=
leftover_edus
pending_presence
=
self
.
pending_presence_by_dest
.
pop
(
destination
,
{})
pending_presence
=
self
.
pending_presence_by_dest
.
pop
(
destination
,
{})
pending_edus
.
extend
(
pending_edus
.
extend
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment