mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-26 18:37:35 +00:00
fix(database): Assert ColumnFamily layout and document Map drop order
This commit is contained in:
2 files changed
+19
-1
No files matched your search
@@ -46,6 +46,10 @@ use crate::{Engine, watchers::Watchers};
|
||||
pub struct Map {
|
||||
name: &'static str,
|
||||
watchers: Watchers,
|
||||
/// SAFETY / DROP ORDER: `cf` holds a lifetime-erased RocksDB column family
|
||||
/// handle (see `open::open`) and MUST be declared before `db` so that the
|
||||
/// handle is destroyed before `Engine` (and the underlying RocksDB `DB`)
|
||||
/// can be dropped.
|
||||
cf: Arc<ColumnFamily>,
|
||||
db: Arc<Engine>,
|
||||
read_options: ReadOptions,
|
||||
|
||||
Reference in new issue
Block a user