Skip to content

Commit

Permalink
Rounding timestamp to timestamp_frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
nacrooks committed Jul 29, 2020
1 parent 2aaadfe commit 072197c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dataflow/src/source/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ impl ConsistencyInfo {
}
}
assert!(new_ts > self.last_closed_ts);
// Round new_ts to the next greatest self.downgrade_capability_frequency increment.
// This is to guarantee that different workers downgrade (without coordination) to the
// "same" next time
new_ts = new_ts
+ (self.downgrade_capability_frequency
- (new_ts % self.downgrade_capability_frequency));
self.last_closed_ts = new_ts;
Some(self.last_closed_ts)
}
Expand Down

0 comments on commit 072197c

Please sign in to comment.