+5
-5
constellation/src/storage/rocks_store.rs
+5
-5
constellation/src/storage/rocks_store.rs
···
60
60
pub struct RocksStorage {
61
61
pub db: Arc<DBWithThreadMode<MultiThreaded>>, // TODO: mov seqs here (concat merge op will be fun)
62
62
did_id_table: IdTable<Did, DidIdValue, true>,
63
-
target_id_table: IdTable<TargetKey, TargetId, false>,
63
+
target_id_table: IdTable<TargetKey, TargetId, true>,
64
64
is_writer: bool,
65
65
backup_task: Arc<Option<thread::JoinHandle<Result<()>>>>,
66
66
}
···
264
264
265
265
fn open_readmode(path: impl AsRef<Path>, readonly: bool) -> Result<Self> {
266
266
let did_id_table = IdTable::<_, _, true>::setup(DID_IDS_CF);
267
-
let target_id_table = IdTable::<_, _, false>::setup(TARGET_IDS_CF);
267
+
let target_id_table = IdTable::<_, _, true>::setup(TARGET_IDS_CF);
268
268
269
269
let cfs = vec![
270
270
// id reference tables
···
960
960
}
961
961
962
962
let mut items: Vec<(String, u64, u64)> = Vec::with_capacity(grouped_counts.len());
963
-
for (target_id, (n, dids)) in grouped_counts {
964
-
let Some(target) = self.target_id_table.get_val_from_id(&self.db, target_id)? else {
963
+
for (target_id, (n, dids)) in &grouped_counts {
964
+
let Some(target) = self.target_id_table.get_val_from_id(&self.db, target_id.0)? else {
965
965
eprintln!("failed to look up target from target_id {target_id:?}");
966
966
continue;
967
967
};
968
-
items.push((target, n, dids.len() as u64));
968
+
items.push((target.0.0, *n, dids.len() as u64));
969
969
}
970
970
971
971
let next = if grouped_counts.len() as u64 >= limit {