Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/trace/implementations/spine_fueled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,20 +210,25 @@ where

Some((CursorList::new(cursors, &storage), storage))
}
#[inline]
fn set_logical_compaction(&mut self, frontier: AntichainRef<B::Time>) {
self.logical_frontier.clear();
self.logical_frontier.extend(frontier.iter().cloned());
}
#[inline]
fn get_logical_compaction(&mut self) -> AntichainRef<B::Time> { self.logical_frontier.borrow() }
#[inline]
fn set_physical_compaction(&mut self, frontier: AntichainRef<B::Time>) {
// We should never request to rewind the frontier.
debug_assert!(PartialOrder::less_equal(&self.physical_frontier.borrow(), &frontier), "FAIL\tthrough frontier !<= new frontier {:?} {:?}\n", self.physical_frontier, frontier);
self.physical_frontier.clear();
self.physical_frontier.extend(frontier.iter().cloned());
self.consider_merges();
}
#[inline]
fn get_physical_compaction(&mut self) -> AntichainRef<B::Time> { self.physical_frontier.borrow() }

#[inline]
fn map_batches<F: FnMut(&Self::Batch)>(&self, mut f: F) {
for batch in self.merging.iter().rev() {
match batch {
Expand Down
1 change: 1 addition & 0 deletions src/trace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ pub trait TraceReader {
/// Reads the upper frontier of committed times.
///
///
#[inline]
fn read_upper(&mut self, target: &mut Antichain<Self::Time>)
where
Self::Time: Timestamp,
Expand Down
4 changes: 3 additions & 1 deletion src/trace/wrappers/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ where
}
}
/// Replaces elements of `lower` with those of `upper`.
#[inline]
pub fn adjust_logical_compaction(&mut self, lower: AntichainRef<Tr::Time>, upper: AntichainRef<Tr::Time>) {
self.logical_compaction.update_iter(upper.iter().cloned().map(|t| (t,1)));
self.logical_compaction.update_iter(lower.iter().cloned().map(|t| (t,-1)));
self.trace.set_logical_compaction(self.logical_compaction.frontier());
}
/// Replaces elements of `lower` with those of `upper`.
#[inline]
pub fn adjust_physical_compaction(&mut self, lower: AntichainRef<Tr::Time>, upper: AntichainRef<Tr::Time>) {
self.physical_compaction.update_iter(upper.iter().cloned().map(|t| (t,1)));
self.physical_compaction.update_iter(lower.iter().cloned().map(|t| (t,-1)));
Expand Down Expand Up @@ -177,4 +179,4 @@ where
self.logical_compaction = Antichain::new();
self.physical_compaction = Antichain::new();
}
}
}