pub fn frontier_within_lag(
frontier: &Antichain<Timestamp>,
reference: &Antichain<Timestamp>,
allowed_lag: Timestamp,
) -> boolExpand description
Returns whether frontier is at most allowed_lag behind reference.
The predicate is reference <= frontier + allowed_lag, evaluated on
antichains. Timestamps that would overflow when advanced by allowed_lag
saturate at Timestamp::MAX rather than panicking, so a frontier close to
the end of the timestamp domain reads as far ahead rather than aborting the
caller.
Note the two degenerate cases, which callers usually want to handle themselves rather than inherit:
- An empty
referenceis the maximum antichain, so the result istrueonly whenfrontieris empty too. It denotes completion, which a finitefrontiercannot satisfy, regardless of the allowance. - An empty
frontieris likewise the maximum, so the result istruefor everyreference.