Skip to content

Commit

Permalink
gc: only invalidate sorting if justified
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Nov 28, 2023
1 parent dc9844c commit 2711521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/re_arrow_store/src/store_gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ impl IndexedBucketInner {
// We removed the last row
*time_range = TimeRange::EMPTY;
} else {
*is_sorted = false;
*is_sorted = row_index == 0 || row_index.saturating_add(1) == col_row_id.len();

// We have at least two rows, so we can safely [index] here:
if row_index == 0 {
Expand Down Expand Up @@ -709,7 +709,7 @@ impl PersistentIndexedTable {
let mut diff: Option<StoreDiff> = None;

if let Ok(row_index) = col_row_id.binary_search(&row_id) {
*is_sorted = row_index.saturating_add(1) == col_row_id.len();
*is_sorted = row_index == 0 || row_index.saturating_add(1) == col_row_id.len();

// col_row_id
let Some(removed_row_id) = col_row_id.swap_remove(row_index) else {
Expand Down

0 comments on commit 2711521

Please sign in to comment.