mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 13:16:56 +00:00
fix(federation): Queue PDUs during remote joins
This commit is contained in:
1 parent
0907323588
commit
df95abf5ab
8 files changed
+141
-10
No files matched your search
@@ -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(
|
||||
|
||||
@@ -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 }
|
||||
|
||||
Reference in new issue
Block a user