fix(federation): Queue PDUs during remote joins

This commit is contained in:
Erwan Leboucher authored and Ellis Git committed 2026-08-22 18:29:54 +00:00
1 parent 0907323588
commit df95abf5ab
8 files changed
+141 -10

No files matched your search

+7
View File
@@ -115,6 +115,13 @@ pub fn check(config: &Config) -> Result {
));
}
if config.remote_join_pdu_queue_capacity == 0 {
return Err!(Config(
"remote_join_pdu_queue_capacity",
"The remote join PDU queue capacity must be greater than zero"
));
}
// yeah, unless the user built a debug build hopefully for local testing only
if cfg!(not(debug_assertions)) && config.server_name == "your.server.name" {
return Err!(Config(
+8
View File
@@ -555,6 +555,12 @@ pub struct Config {
#[serde(default = "default_max_concurrent_inbound_transactions")]
pub max_concurrent_inbound_transactions: usize,
/// Maximum number of federation PDUs queued while completing a remote join.
///
/// default: 50
#[serde(default = "default_remote_join_pdu_queue_capacity")]
pub remote_join_pdu_queue_capacity: usize,
/// Maximum age (in seconds) for cached federation transaction responses.
/// Entries older than this will be removed during cleanup.
///
@@ -3006,6 +3012,8 @@ fn default_max_fetch_prev_events() -> u16 { 1024 }
fn default_max_concurrent_inbound_transactions() -> usize { 150 }
fn default_remote_join_pdu_queue_capacity() -> usize { 50 }
fn default_transaction_id_cache_max_age_secs() -> u64 { 60 * 60 * 2 }
fn default_transaction_id_cache_max_entries() -> usize { 8192 }