fn find_matching_timestamp(
        &mut self,
        partition: &PartitionId,
        offset: MzOffset,
        timestamp_bindings: &TimestampBindingRc,
    ) -> Option<Timestamp> {
        // We either can take a fast path, where we simply re-use the currently
        // available timestamp binding, or if one isn't available for `offset` in `partition`, we have to
        // look it up from the set of timestamp histories

        // We know we will only read from partitions already assigned to this
        // worker.
        let cons_info = self
            .partition_metadata
            .get_mut(partition)
            .expect("known to exist");

        if cons_info.is_valid(offset) {
            // This is the fast path - we can reuse a timestamp binding
            // we already know about.
            cons_info.update_offset(offset);
            Some(cons_info.current_ts)
        } else if let Some((timestamp, max_offset)) =
            timestamp_bindings.get_binding(partition, offset)
        {
            cons_info.update_timestamp(timestamp, max_offset);
            cons_info.update_offset(offset);
            Some(timestamp)
        } else {
            None
        }
    }
/// For a given offset, returns an option type returning the matching timestamp or None
/// if no timestamp can be assigned.
///
/// The timestamp history contains a sequence of
/// (partition_count, timestamp, offset) tuples. A message with offset x will be assigned the first timestamp
/// for which offset>=x.
For a given offset, returns an option type returning the matching timestamp or None
if no timestamp can be assigned.

The timestamp history contains a sequence of
(partition_count, timestamp, offset) tuples. A message with offset x will be assigned the first timestamp
for which offset>=x.
For a given offset returns an option type returning the matching timestamp or None if no timestamp can be assigned . The timestamp history contains a sequence of ( partition_count timestamp offset ) tuples . A message with offset x will be assigned the first timestamp for which offset > = x .
fn find_matching_timestamp(
        &mut self,
        partition: &PartitionId,
        offset: MzOffset,
        timestamp_bindings: &TimestampBindingRc,
    ) -> Option<Timestamp> {
        // We either can take a fast path, where we simply re-use the currently
        // available timestamp binding, or if one isn't available for `offset` in `partition`, we have to
        // look it up from the set of timestamp histories
        // We know we will only read from partitions already assigned to this
        // worker.
        let cons_info = self
            .partition_metadata
            .get_mut(partition)
            .expect("known to exist");
        if cons_info.is_valid(offset) {
            // This is the fast path - we can reuse a timestamp binding
            // we already know about.
            cons_info.update_offset(offset);
            Some(cons_info.current_ts)
        } else if let Some((timestamp, max_offset)) =
            timestamp_bindings.get_binding(partition, offset)
        {
            cons_info.update_timestamp(timestamp, max_offset);
            cons_info.update_offset(offset);
            Some(timestamp)
        } else {
            None
        }
    }
fn find_matching_timestamp ( & mut self , partition : & PartitionId , offset : MzOffset , timestamp_bindings : & TimestampBindingRc , ) -> Option < Timestamp > { // We either can take a fast path, where we simply re-use the currently // available timestamp binding, or if one isn't available for `offset` in `partition`, we have to // look it up from the set of timestamp histories // We know we will only read from partitions already assigned to this // worker. let cons_info = self . partition_metadata . get_mut ( partition ) . expect ( " " ) ; if cons_info . is_valid ( offset ) { // This is the fast path - we can reuse a timestamp binding // we already know about. cons_info . update_offset ( offset ) ; Some ( cons_info . current_ts ) } else if let Some ( ( timestamp , max_offset ) ) = timestamp_bindings . get_binding ( partition , offset ) { cons_info . update_timestamp ( timestamp , max_offset ) ; cons_info . update_offset ( offset ) ; Some ( timestamp ) } else { None } }
For a given offset, returns an option type returning the matching timestamp or None
if no timestamp can be assigned.
For a given offset returns an option type returning the matching timestamp or None if no timestamp can be assigned .
&mut self
partition
&PartitionId
offset
MzOffset
timestamp_bindings
&TimestampBindingRc
&mut self
partition
&PartitionId
offset
MzOffset
timestamp_bindings
&TimestampBindingRc