fix(database): Assert ColumnFamily layout and document Map drop order

This commit is contained in:
Jade Ellis committed 2026-11-21 18:04:48 +00:00
1 parent 95f925eaee
commit 65d25c77e8
2 files changed
+19 -1

No files matched your search

+4
View File
@@ -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,