diff --git a/src/database/engine.rs b/src/database/engine.rs index c8d70304..40a5438c 100644 --- a/src/database/engine.rs +++ b/src/database/engine.rs @@ -1,5 +1,5 @@ use std::{ - collections::{HashMap, HashSet}, + collections::{BTreeSet, HashMap}, fmt::Write, sync::{atomic::AtomicU32, Arc, Mutex, RwLock}, }; @@ -23,7 +23,7 @@ pub struct Engine { col_cache: RwLock>, opts: Options, env: Env, - cfs: Mutex>, + cfs: Mutex>, pub(crate) db: Db, corks: AtomicU32, } @@ -57,7 +57,10 @@ impl Engine { } debug!("Listing column families in database"); - let cfs = Db::list_cf(&db_opts, &config.database_path).unwrap_or_default(); + let cfs = Db::list_cf(&db_opts, &config.database_path) + .unwrap_or_default() + .into_iter() + .collect::>(); debug!("Opening {} column family descriptors in database", cfs.len()); let cfds = cfs @@ -79,7 +82,6 @@ impl Engine { load_time.elapsed() ); - let cfs = HashSet::::from_iter(cfs); Ok(Arc::new(Self { server: server.clone(), row_cache,