Skip to content

Commit

Permalink
Correct filtering of retractions
Browse files Browse the repository at this point in the history
Retractions were being filtered while still assessing the number of records, causing the calculations to not reflect progress made by merges. At the same time, the filtering was not applied to count outputs, so retractions there (when counts increased) were presented as positive occurrences (though they should all have been immediately followed by new larger values, as the previous filtering ensured no counts ever decreased).
  • Loading branch information
frankmcsherry authored Aug 22, 2019
1 parent 7872496 commit f312b43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tdiag/src/commands/arrangements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,6 @@ pub fn listen(
}
})
.as_collection()
.inner
// We do not bother with retractions here, because the
// user is only interested in the current count.
.filter(|(_, _, count)| count >= &0)
.as_collection()
.delay(move |t| {
let w_secs = window_size.as_secs();

Expand All @@ -123,6 +118,11 @@ pub fn listen(
Duration::new(secs_coarsened, 0)
})
.count()
.inner
// We do not bother with retractions here, because the
// user is only interested in the current count.
.filter(|(_, _, count)| count >= &0)
.as_collection()
.join(&operates)
.inspect(|(((worker, operator), (count, name)), t, _diff)| {
println!("{}\t{}\t{}\t{}\t{}", t.as_millis(), worker, operator, name, count);
Expand Down

0 comments on commit f312b43

Please sign in to comment.