Add an option to fix the pathological space usage of RocksDB on btrfs.

This commit is contained in:
Rimi Kanokawa
2026-02-16 23:39:49 -08:00
parent e74186ac62
commit 96ba9b0129
3 changed files with 31 additions and 0 deletions

View File

@@ -1350,6 +1350,20 @@ pub struct Config {
#[serde(default)]
pub rocksdb_never_drop_columns: bool,
/// Configures RocksDB to not preallocate WAL logs.
///
/// Normally, RocksDB allocates certain types of files by calling
/// fallocate, writing the file contents, then truncating the logs to the
/// proper size. This causes pathological disk space usage on btrfs due
/// how it interacts with its Copy-on-Write implementation.
///
/// It is recommended to set this to false if you run the server on btrfs,
/// and not touch it otherwise.
///
/// default: true
#[serde(default = "true_fn")]
pub rocksdb_allow_fallocate: bool,
/// This is a password that can be configured that will let you login to the
/// server bot account (currently `@conduit`) for emergency troubleshooting
/// purposes such as recovering/recreating your admin room, or inviting