From c6cf3589f4f28833c3e7bf23e2f91ea49ef46d2c Mon Sep 17 00:00:00 2001 From: strawberry Date: Fri, 15 Mar 2024 22:39:28 -0400 Subject: [PATCH] check if rocksdb_max_log_files is 0 Signed-off-by: strawberry --- src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.rs b/src/main.rs index d027f4b5..97dd6eb4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -220,6 +220,12 @@ async fn main() { } } + // rocksdb does not allow max_log_files to be 0 + if config.rocksdb_max_log_files == 0 && cfg!(feature = "rocksdb") { + error!("When using RocksDB, rocksdb_max_log_files cannot be 0. Please set a value at least 1."); + return; + } + // yeah, unless the user built a debug build hopefully for local testing only if config.server_name == "your.server.name" && !cfg!(debug_assertions) { error!("You must specify a valid server name for production usage of conduwuit.");