Skip to content

Commit

Permalink
StoreGeneration now accounts for GCs too
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc committed Nov 12, 2023
1 parent 36e7102 commit 05a71ef
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions crates/re_arrow_store/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,12 @@ impl std::ops::DerefMut for ClusterCellCache {

// ---

/// Incremented on each edit
/// Incremented on each edit.
#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct StoreGeneration(u64);
pub struct StoreGeneration {
insert_id: u64,
gc_id: u64,
}

/// A complete data store: covers all timelines, all entities, everything.
///
Expand Down Expand Up @@ -275,7 +278,10 @@ impl DataStore {
/// Return the current `StoreGeneration`. This can be used to determine whether the
/// database has been modified since the last time it was queried.
pub fn generation(&self) -> StoreGeneration {
StoreGeneration(self.insert_id)
StoreGeneration {
insert_id: self.insert_id,
gc_id: self.gc_id,
}
}

/// See [`Self::cluster_key`] for more information about the cluster key.
Expand Down

0 comments on commit 05a71ef

Please sign in to comment.