Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

Commit bc7bde4

Browse files
committed
Drop column family again.
1 parent 90265a0 commit bc7bde4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/trace/ord/persistent/zset_batch.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ where
5555
{
5656
/// Where all the dataz is.
5757
cf: Arc<BoundColumnFamily<'static>>,
58-
_cf_name: String,
58+
cf_name: String,
5959
_cf_options: Options,
6060
/// The DB only "knows" approximate key count so we store the accurate count here
6161
keys: usize,
@@ -64,6 +64,16 @@ where
6464
_t: PhantomData<(K, R)>,
6565
}
6666

67+
impl<K, R> Drop for OrdZSet<K, R>
68+
where
69+
K: Ord + Encode + Decode,
70+
R: Encode,
71+
{
72+
fn drop(&mut self) {
73+
LEVEL_DB.drop_cf(&self.cf_name).expect("Can't delete CF?");
74+
}
75+
}
76+
6777
impl<K, R> Display for OrdZSet<K, R>
6878
where
6979
K: Ord + Clone + Display + Encode + Decode + 'static,
@@ -611,7 +621,7 @@ where
611621

612622
OrdZSet {
613623
cf: self.cf,
614-
_cf_name: self.cf_name,
624+
cf_name: self.cf_name,
615625
_cf_options: self.cf_options,
616626
keys,
617627
lower: Antichain::from_elem(()),

0 commit comments

Comments
 (0)