Skip to content

Commit

Permalink
remove deleted config options and update address example option
Browse files Browse the repository at this point in the history
Signed-off-by: strawberry <[email protected]>
  • Loading branch information
girlbossceo committed Jun 3, 2024
1 parent 6dc59c8 commit 670af7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 deletions.
19 changes: 5 additions & 14 deletions conduwuit-example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,16 @@ database_backend = "rocksdb"
# forwarded to the conduwuit instance running on this port
# Docker users: Don't change this, you'll need to map an external port to this.
# To listen on multiple ports, specify a vector e.g. [8080, 8448]
#
# default if unspecified is 8008
port = 6167

# default address (IPv4 or IPv6) conduwuit will listen on. Generally you want this to be
# localhost (127.0.0.1 / ::1). If you are using Docker or a container NAT networking setup, you
# likely need this to be 0.0.0.0.
# To listen multiple addresses, specify a vector e.g. ["127.0.0.1", "::1"]
#
# default if unspecified is both IPv4 and IPv6 localhost: ["127.0.0.1", "::1"]
address = "127.0.0.1"

# Max request size for file uploads
Expand Down Expand Up @@ -375,15 +380,6 @@ allow_profile_lookup_federation_requests = true
# Defaults to 256.0
#db_cache_capacity_mb = 256.0

# Interval in seconds when conduwuit will run database cleanup operations.
#
# For SQLite: this will flush the WAL by executing `PRAGMA wal_checkpoint(RESTART)` (https://www.sqlite.org/pragma.html#pragma_wal_checkpoint)
# For RocksDB: this will run `flush_opt` to flush database memtables to SST files on disk (https://docs.rs/rocksdb/latest/rocksdb/struct.DBCommon.html#method.flush_opt)
# These operations always run on shutdown.
#
# Defaults to 30 minutes (1800 seconds) to avoid IO amplification from too frequent cleanups
#cleanup_second_interval = 1800


### RocksDB options

Expand Down Expand Up @@ -492,11 +488,6 @@ allow_profile_lookup_federation_requests = true
# Defaults to 1 (TolerateCorruptedTailRecords)
#rocksdb_recovery_mode = 1

# Controls whether memory buffers are written to storage at the fixed interval set by `cleanup_period_interval`
# even when they are not full. Setting this will increase load on the storage backplane and is never advised
# under normal circumstances.
#rocksdb_periodic_cleanup = false


### Domain Name Resolution and Caching

Expand Down
12 changes: 0 additions & 12 deletions src/core/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ pub struct Config {
#[serde(default = "default_roomid_spacehierarchy_cache_capacity")]
pub roomid_spacehierarchy_cache_capacity: u32,

#[serde(default = "default_cleanup_second_interval")]
pub cleanup_second_interval: u32,

#[serde(default = "default_dns_cache_entries")]
pub dns_cache_entries: u32,
#[serde(default = "default_dns_min_ttl")]
Expand Down Expand Up @@ -249,8 +246,6 @@ pub struct Config {
#[serde(default)]
pub rocksdb_read_only: bool,
#[serde(default)]
pub rocksdb_periodic_cleanup: bool,
#[serde(default)]
pub rocksdb_compaction_prio_idle: bool,
#[serde(default = "true_fn")]
pub rocksdb_compaction_ioprio_idle: bool,
Expand Down Expand Up @@ -541,7 +536,6 @@ impl fmt::Display for Config {
"Roomid space hierarchy cache capacity",
&self.roomid_spacehierarchy_cache_capacity.to_string(),
),
("Cleanup interval in seconds", &self.cleanup_second_interval.to_string()),
("DNS cache entry limit", &self.dns_cache_entries.to_string()),
("DNS minimum TTL", &self.dns_min_ttl.to_string()),
("DNS minimum NXDOMAIN TTL", &self.dns_min_ttl_nxdomain.to_string()),
Expand Down Expand Up @@ -750,8 +744,6 @@ impl fmt::Display for Config {
#[cfg(feature = "rocksdb")]
("RocksDB Read-only Mode", &self.rocksdb_read_only.to_string()),
#[cfg(feature = "rocksdb")]
("RocksDB Periodic Cleanup", &self.rocksdb_periodic_cleanup.to_string()),
#[cfg(feature = "rocksdb")]
(
"RocksDB Compaction Idle Priority",
&self.rocksdb_compaction_prio_idle.to_string(),
Expand Down Expand Up @@ -929,10 +921,6 @@ fn default_stateinfo_cache_capacity() -> u32 { 100 }

fn default_roomid_spacehierarchy_cache_capacity() -> u32 { 100 }

fn default_cleanup_second_interval() -> u32 {
1800 // every 30 minutes
}

fn default_dns_cache_entries() -> u32 { 32768 }

fn default_dns_min_ttl() -> u64 { 60 * 180 }
Expand Down

0 comments on commit 670af7d

Please sign in to comment.