de-feature rocksdb
This commit is contained in:
parent
cb48e25783
commit
30b5ad3870
6 changed files with 1 additions and 39 deletions
|
@ -24,7 +24,6 @@ release_max_log_level = [
|
|||
"log/max_level_trace",
|
||||
"log/release_max_level_info",
|
||||
]
|
||||
rocksdb = []
|
||||
|
||||
[dependencies]
|
||||
clap.workspace = true
|
||||
|
|
|
@ -64,12 +64,6 @@ pub(super) async fn list_backups(_body: Vec<&str>) -> Result<RoomMessageEventCon
|
|||
}
|
||||
|
||||
pub(super) async fn backup_database(_body: Vec<&str>) -> Result<RoomMessageEventContent> {
|
||||
if !cfg!(feature = "rocksdb") {
|
||||
return Ok(RoomMessageEventContent::text_plain(
|
||||
"Only RocksDB supports online backups in conduwuit.",
|
||||
));
|
||||
}
|
||||
|
||||
let mut result = services()
|
||||
.server
|
||||
.runtime()
|
||||
|
@ -88,12 +82,6 @@ pub(super) async fn backup_database(_body: Vec<&str>) -> Result<RoomMessageEvent
|
|||
}
|
||||
|
||||
pub(super) async fn list_database_files(_body: Vec<&str>) -> Result<RoomMessageEventContent> {
|
||||
if !cfg!(feature = "rocksdb") {
|
||||
return Ok(RoomMessageEventContent::text_plain(
|
||||
"Only RocksDB supports listing files in conduwuit.",
|
||||
));
|
||||
}
|
||||
|
||||
let result = services().globals.db.file_list()?;
|
||||
|
||||
Ok(RoomMessageEventContent::notice_markdown(result))
|
||||
|
|
|
@ -66,7 +66,7 @@ pub fn check(config: &Config) -> Result<(), Error> {
|
|||
});
|
||||
|
||||
// rocksdb does not allow max_log_files to be 0
|
||||
if config.rocksdb_max_log_files == 0 && cfg!(feature = "rocksdb") {
|
||||
if config.rocksdb_max_log_files == 0 {
|
||||
return Err(Error::bad_config(
|
||||
"When using RocksDB, rocksdb_max_log_files cannot be 0. Please set a value at least 1.",
|
||||
));
|
||||
|
|
|
@ -711,54 +711,37 @@ impl fmt::Display for Config {
|
|||
("Gzip HTTP Compression", &self.gzip_compression.to_string()),
|
||||
#[cfg(feature = "brotli_compression")]
|
||||
("Brotli HTTP Compression", &self.brotli_compression.to_string()),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
("RocksDB database LOG level", &self.rocksdb_log_level),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
("RocksDB database LOG to stderr", &self.rocksdb_log_stderr.to_string()),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
("RocksDB database LOG time-to-roll", &self.rocksdb_log_time_to_roll.to_string()),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
("RocksDB Max LOG Files", &self.rocksdb_max_log_files.to_string()),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
(
|
||||
"RocksDB database max LOG file size",
|
||||
&self.rocksdb_max_log_file_size.to_string(),
|
||||
),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
(
|
||||
"RocksDB database optimize for spinning disks",
|
||||
&self.rocksdb_optimize_for_spinning_disks.to_string(),
|
||||
),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
("RocksDB Direct-IO", &self.rocksdb_direct_io.to_string()),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
("RocksDB Parallelism Threads", &self.rocksdb_parallelism_threads.to_string()),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
("RocksDB Compression Algorithm", &self.rocksdb_compression_algo),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
("RocksDB Compression Level", &self.rocksdb_compression_level.to_string()),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
(
|
||||
"RocksDB Bottommost Compression Level",
|
||||
&self.rocksdb_bottommost_compression_level.to_string(),
|
||||
),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
(
|
||||
"RocksDB Bottommost Level Compression",
|
||||
&self.rocksdb_bottommost_compression.to_string(),
|
||||
),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
("RocksDB Recovery Mode", &self.rocksdb_recovery_mode.to_string()),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
("RocksDB Repair Mode", &self.rocksdb_repair.to_string()),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
("RocksDB Read-only Mode", &self.rocksdb_read_only.to_string()),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
(
|
||||
"RocksDB Compaction Idle Priority",
|
||||
&self.rocksdb_compaction_prio_idle.to_string(),
|
||||
),
|
||||
#[cfg(feature = "rocksdb")]
|
||||
(
|
||||
"RocksDB Compaction Idle IOPriority",
|
||||
&self.rocksdb_compaction_ioprio_idle.to_string(),
|
||||
|
|
|
@ -24,9 +24,6 @@ release_max_log_level = [
|
|||
"log/max_level_trace",
|
||||
"log/release_max_level_info",
|
||||
]
|
||||
rocksdb = [
|
||||
"dep:rust-rocksdb",
|
||||
]
|
||||
jemalloc = [
|
||||
"rust-rocksdb/jemalloc",
|
||||
]
|
||||
|
@ -43,7 +40,6 @@ conduit-core.workspace = true
|
|||
log.workspace = true
|
||||
lru-cache.workspace = true
|
||||
ruma.workspace = true
|
||||
rust-rocksdb.optional = true
|
||||
rust-rocksdb.workspace = true
|
||||
tokio.workspace = true
|
||||
tracing.workspace = true
|
||||
|
|
|
@ -43,7 +43,6 @@ default = [
|
|||
"io_uring",
|
||||
"jemalloc",
|
||||
"release_max_log_level",
|
||||
"rocksdb",
|
||||
"sentry_telemetry",
|
||||
"systemd",
|
||||
"zstd_compression",
|
||||
|
@ -114,9 +113,6 @@ release_max_log_level = [
|
|||
"conduit-router/release_max_log_level",
|
||||
"conduit-service/release_max_log_level",
|
||||
]
|
||||
rocksdb = [
|
||||
"conduit-database/rocksdb",
|
||||
]
|
||||
sentry_telemetry = [
|
||||
"dep:sentry",
|
||||
"dep:sentry-tracing",
|
||||
|
|
Loading…
Add table
Reference in a new issue