Skip to content

Commit

Permalink
propagate changes, lints, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Nov 12, 2023
1 parent 442eccf commit 092b7e0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion crates/re_arrow_store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub mod test_util;
pub use self::arrow_util::ArrayExt;
pub use self::store::{DataStore, DataStoreConfig, StoreGeneration};
pub use self::store_event::{StoreDiff, StoreDiffKind, StoreEvent};
pub use self::store_gc::{GarbageCollectionOptions, GarbageCollectionTarget};
pub use self::store_gc::{Deleted, GarbageCollectionOptions, GarbageCollectionTarget};
pub use self::store_helpers::VersionedComponent;
pub use self::store_read::{LatestAtQuery, RangeQuery};
pub use self::store_stats::{DataStoreRowStats, DataStoreStats, EntityStats};
Expand Down
6 changes: 5 additions & 1 deletion crates/re_arrow_store/tests/correctness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,11 @@ fn entity_min_time_correct() -> anyhow::Result<()> {
init_logs();

for config in re_arrow_store::test_util::all_configs() {
let mut store = DataStore::new(InstanceKey::name(), config.clone());
let mut store = DataStore::new(
re_log_types::StoreId::random(re_log_types::StoreKind::Recording),
InstanceKey::name(),
config.clone(),
);
entity_min_time_correct_impl(&mut store)?;
}

Expand Down
3 changes: 1 addition & 2 deletions crates/re_arrow_store/tests/data_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fn insert_table_with_retries(store: &mut DataStore, table: &DataTable) {
Err(WriteError::ReusedRowId(_)) => {
row.row_id = row.row_id.next();
}
err @ Err(_) => err.unwrap(),
err @ Err(_) => err.map(|_| ()).unwrap(),
}
}
}
Expand Down Expand Up @@ -493,7 +493,6 @@ fn range_impl(store: &mut DataStore) {
for table in store.to_data_tables(None) {
insert_table_with_retries(&mut store2, &table);
}
store2.wipe_timeless_data();
store2.gc(GarbageCollectionOptions::gc_everything());
for table in store.to_data_tables(None) {
insert_table_with_retries(&mut store2, &table);
Expand Down
5 changes: 1 addition & 4 deletions crates/re_arrow_store/tests/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn insert_table_with_retries(store: &mut DataStore, table: &DataTable) {
Err(WriteError::ReusedRowId(_)) => {
row.row_id = row.row_id.next();
}
err @ Err(_) => err.unwrap(),
err @ Err(_) => err.map(|_| ()).unwrap(),
}
}
}
Expand Down Expand Up @@ -60,11 +60,8 @@ fn data_store_dump() {
data_store_dump_impl(&mut store1, &mut store2, &mut store3);

// stress-test GC impl
store1.wipe_timeless_data();
store1.gc(GarbageCollectionOptions::gc_everything());
store2.wipe_timeless_data();
store2.gc(GarbageCollectionOptions::gc_everything());
store3.wipe_timeless_data();
store3.gc(GarbageCollectionOptions::gc_everything());

data_store_dump_impl(&mut store1, &mut store2, &mut store3);
Expand Down
11 changes: 6 additions & 5 deletions crates/re_arrow_store/tests/internals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@ fn pathological_bucket_topology() {
})
.collect::<Vec<_>>();

rows.iter()
.for_each(|row| store_forward.insert_row(row).unwrap());
for row in &rows {
store_forward.insert_row(row).unwrap();
}

rows.iter()
.rev()
.for_each(|row| store_backward.insert_row(row).unwrap());
rows.iter().rev().for_each(|row| {
store_backward.insert_row(row).unwrap();
});
}

store_repeated_frame(1000, 10, &mut store_forward, &mut store_backward);
Expand Down

0 comments on commit 092b7e0

Please sign in to comment.