Struct dataflow::source::timestamp::TimestampBindingRc [−][src]
pub struct TimestampBindingRc {
pub wrapper: Rc<RefCell<TimestampBindingBox>>,
compaction_frontier: Antichain<Timestamp>,
}
Expand description
A wrapper that allows multiple source instances to share a TimestampBindingBox
and hold back its compaction.
Fields
wrapper: Rc<RefCell<TimestampBindingBox>>
The wrapped shared state.
compaction_frontier: Antichain<Timestamp>
Implementations
Create a new instance of TimestampBindingRc
.
Set the compaction frontier to new_frontier
and compact all timestamp bindings at
timestamps less than the compaction frontier.
Note that new_frontier
must be in advance of the current compaction
frontier. The source can be correctly replayed from any as_of
in advance of
the compaction frontier after this operation.
Sets the durability frontier, aka, the frontier before which all updates can be replayed across restarts.
Add a new mapping from (partition, offset) -> timestamp
.
Note that the timestamp
has to be greater than the largest previously bound
timestamp for that partition, and offset
has to be greater than or equal to
the largest previously bound offset for that partition. If proposed
is true,
the binding is treated as tentative and may be overwritten by other, overlapping
bindings
Tell timestamping machinery to look out for partition
The optional restored_offset
can be used to give an explicit offset that should be used when
starting to read from the given partition.
Get the timestamp assignment for (partition, offset)
if it is known.
This function returns the timestamp and the maximum offset for which it is valid.
Get the timestamp that all messages beyond the minted bindings will be assigned to. This is equal to the proposer’s current timestamp
Returns the frontier of timestamps that have not been bound to any incoming data, or in other words, all data has been assigned timestamps less than some element in the returned frontier.
All subsequent updates will either be at or in advance of this frontier.
pub fn downgrade(
&self,
cap: &mut Capability<Timestamp>,
cursors: &HashMap<PartitionId, MzOffset>
)
pub fn downgrade(
&self,
cap: &mut Capability<Timestamp>,
cursors: &HashMap<PartitionId, MzOffset>
)
Attempt to downgrade the given capability by consulting the currently known bindings and the per partition cursors of the caller.
Returns the list of partitions this source knows about.
TODO(rkhaitan): this function feels like a hack, both in the API of having the source instances ask for the list of known partitions and in allocating a vector to answer that question.
Instructs RT sources to try and move forward to the next timestamp if possible
pub fn get_bindings_in_range(
&self,
lower: AntichainRef<'_, Timestamp>,
upper: AntichainRef<'_, Timestamp>
) -> Vec<(PartitionId, Timestamp, MzOffset)>ⓘ
pub fn get_bindings_in_range(
&self,
lower: AntichainRef<'_, Timestamp>,
upper: AntichainRef<'_, Timestamp>
) -> Vec<(PartitionId, Timestamp, MzOffset)>ⓘ
Return all timestamp bindings at or in advance of lower and not at or in advance of upper
Returns the current durability frontier
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TimestampBindingRc
impl !Send for TimestampBindingRc
impl !Sync for TimestampBindingRc
impl Unpin for TimestampBindingRc
impl !UnwindSafe for TimestampBindingRc
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more