Skip to content

Commit

Permalink
Dont protect the rows for log_time/log_tick
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Jun 10, 2024
1 parent c05b890 commit ef70f90
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions crates/re_data_store/src/store_gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ impl DataStore {

let (initial_num_rows, initial_num_bytes) = stats_before.total_rows_and_bytes();

let protected_rows =
self.find_all_protected_rows(options.protect_latest, &options.dont_protect_components);
let protected_rows = self.find_all_protected_rows(
options.protect_latest,
&options.dont_protect_components,
&options.dont_protect_timelines,
);

let mut diffs = match options.target {
GarbageCollectionTarget::DropAtLeastFraction(p) => {
Expand Down Expand Up @@ -437,7 +440,8 @@ impl DataStore {
fn find_all_protected_rows(
&mut self,
target_count: usize,
dont_protect: &HashSet<ComponentName>,
dont_protect_components: &HashSet<ComponentName>,
dont_protect_timelines: &HashSet<Timeline>,
) -> HashSet<RowId> {
re_tracing::profile_function!();

Expand All @@ -451,11 +455,14 @@ impl DataStore {
let mut protected_rows: HashSet<RowId> = Default::default();

// Find all protected rows in regular indexed tables
for table in self.tables.values() {
for ((_, timeline), table) in &self.tables {
if dont_protect_timelines.contains(timeline) {
continue;
}
let mut components_to_find: HashMap<ComponentName, usize> = table
.all_components
.iter()
.filter(|c| !dont_protect.contains(*c))
.filter(|c| !dont_protect_components.contains(*c))
.map(|c| (*c, target_count))
.collect();

Expand Down

0 comments on commit ef70f90

Please sign in to comment.