mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
store old_cfs as a HashSet
This list can't have duplicates.
This commit is contained in:
parent
a60a9551e1
commit
53fbd3fc41
1 changed files with 3 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
use std::{
|
use std::{
|
||||||
|
collections::HashSet,
|
||||||
future::Future,
|
future::Future,
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
sync::{Arc, RwLock},
|
sync::{Arc, RwLock},
|
||||||
|
|
@ -20,7 +21,7 @@ pub(crate) struct Engine {
|
||||||
rocks: DBWithThreadMode<MultiThreaded>,
|
rocks: DBWithThreadMode<MultiThreaded>,
|
||||||
max_open_files: i32,
|
max_open_files: i32,
|
||||||
cache: Cache,
|
cache: Cache,
|
||||||
old_cfs: Vec<String>,
|
old_cfs: HashSet<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) struct RocksDbEngineTree<'a> {
|
pub(crate) struct RocksDbEngineTree<'a> {
|
||||||
|
|
@ -84,6 +85,7 @@ impl KeyValueDatabaseEngine for Arc<Engine> {
|
||||||
&db_opts,
|
&db_opts,
|
||||||
&config.database_path,
|
&config.database_path,
|
||||||
)
|
)
|
||||||
|
.map(|x| x.into_iter().collect::<HashSet<_>>())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
let db = DBWithThreadMode::<MultiThreaded>::open_cf_descriptors(
|
let db = DBWithThreadMode::<MultiThreaded>::open_cf_descriptors(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue