Struct persist::indexed::encoding::BlobTraceBatch [−][src]
pub struct BlobTraceBatch {
pub desc: Description<u64>,
pub updates: Vec<ColumnarRecords>,
}
Expand description
The structure serialized and stored as a value in crate::storage::Blob storage for data keys corresponding to trace data.
This batch represents the data that was originally written at some time in [lower, upper) (more precisely !< lower and < upper). The individual record times may have later been advanced by compaction to something <= since. This means the ability to reconstruct the state of the collection at times < since has been lost. However, there may still be records present in the batch whose times are < since. Users iterating through updates must take care to advance records with times < since to since in order to correctly answer queries at times >= since.
Invariants:
- The [lower, upper) interval of times in desc is non-empty.
- The timestamp of each update is >= to desc.lower().
- The timestamp of each update is < desc.upper() iff desc.upper() > desc.since(). Otherwise the timestamp of each update is <= desc.since().
- The values in updates are sorted by (key, value, time).
- The values in updates are “consolidated”, i.e. (key, value, time) is unique.
- All entries have a non-zero diff.
- (Intentionally no invariant around update non-emptiness because we might need empty batches to make the timestamps line up.)
TODO: This probably wants to be a different level of abstraction, so we can put multiple small batches in a single blob but also break a very large batch over multiple blobs. We also may want to break the latter into chunks for checksum and encryption?
Fields
desc: Description<u64>
Which updates are included in this batch.
updates: Vec<ColumnarRecords>
The updates themselves.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BlobTraceBatch
impl Send for BlobTraceBatch
impl Sync for BlobTraceBatch
impl Unpin for BlobTraceBatch
impl UnwindSafe for BlobTraceBatch
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