Enable file sync protocol v2 in config file by default

This commit is contained in:
boqiu 2024-10-25 15:01:32 +08:00
parent 51a2305c2d
commit cc6cf0fdb2
4 changed files with 13 additions and 1 deletions

View File

@ -23,7 +23,7 @@ pub struct Config {
// sync service config // sync service config
/// Indicates whether to sync file from neighbor nodes only. /// Indicates whether to sync file from neighbor nodes only.
/// This is to avoid flooding file announcements in the whole network, /// This is to avoid flooding file announcements in the whole network,
/// which leads to high latency or event timeout to sync files. /// which leads to high latency or even timeout to sync files.
pub neighbors_only: bool, pub neighbors_only: bool,
#[serde(deserialize_with = "deserialize_duration")] #[serde(deserialize_with = "deserialize_duration")]
pub heartbeat_interval: Duration, pub heartbeat_interval: Duration,

View File

@ -232,6 +232,10 @@ batcher_announcement_capacity = 100
# all files, and sufficient disk space is required. # all files, and sufficient disk space is required.
auto_sync_enabled = true auto_sync_enabled = true
# Indicates whether to sync file from neighbor nodes only. This is to avoid flooding file
# announcements in the whole network, which leads to high latency or even timeout to sync files.
neighbors_only = true
# Maximum number of files in sync from other peers simultaneously. # Maximum number of files in sync from other peers simultaneously.
# max_sync_files = 8 # max_sync_files = 8

View File

@ -244,6 +244,10 @@ batcher_announcement_capacity = 100
# all files, and sufficient disk space is required. # all files, and sufficient disk space is required.
auto_sync_enabled = true auto_sync_enabled = true
# Indicates whether to sync file from neighbor nodes only. This is to avoid flooding file
# announcements in the whole network, which leads to high latency or even timeout to sync files.
neighbors_only = true
# Maximum number of files in sync from other peers simultaneously. # Maximum number of files in sync from other peers simultaneously.
# max_sync_files = 8 # max_sync_files = 8

View File

@ -246,6 +246,10 @@
# all files, and sufficient disk space is required. # all files, and sufficient disk space is required.
# auto_sync_enabled = false # auto_sync_enabled = false
# Indicates whether to sync file from neighbor nodes only. This is to avoid flooding file
# announcements in the whole network, which leads to high latency or even timeout to sync files.
neighbors_only = true
# Maximum number of files in sync from other peers simultaneously. # Maximum number of files in sync from other peers simultaneously.
# max_sync_files = 8 # max_sync_files = 8