Skip to content

Commit

Permalink
Fix merge batcher flat
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Hoffmann <[email protected]>
  • Loading branch information
antiguru committed Jun 11, 2024
1 parent 264c267 commit c7c4aa8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/trace/implementations/merge_batcher_flat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ where
+ Push<((FR::Key<'a>, FR::Val<'a>), FR::Time<'a>, FR::Diff<'a>)>,
for<'a> FR::Time<'a>: PartialOrder<T> + Copy + IntoOwned<'a, Owned=T>,
for<'a> FR::Diff<'a>: IntoOwned<'a, Owned=R>,
for<'a> FR::ReadItem<'a>: std::fmt::Debug,
{
type Time = T;
type Chunk = FlatStack<FR>;
Expand Down Expand Up @@ -171,6 +172,10 @@ where
head1.advance(advance);
result = self.empty(stash);
}
if !result.is_empty() {
output.push(result);
result = self.empty(stash);
}
output.extend(list1);
self.recycle(head1.done(), stash);

Expand Down Expand Up @@ -245,6 +250,8 @@ where
for (key, val, time, _diff) in buffer.iter().map(FR::into_parts) {
if !upper.less_equal(&time) {
if let Some((p_key, p_val)) = prev_keyval {
debug_assert!(p_key <= key);
debug_assert!(p_key != key || p_val <= val);
if p_key != key {
keys += 1;
vals += 1;
Expand Down

0 comments on commit c7c4aa8

Please sign in to comment.