pub struct ChunkMeta {
pub id: ChunkId,
pub end_ns_exclusive: u64,
pub row_count: u64,
pub min_ts_ns: u64,
pub max_ts_ns: u64,
pub sealed: bool,
pub ttl_override_ns: Option<u64>,
pub columnar_page: Option<PageLocation>,
}Expand description
Metadata tracked per child chunk. Physical storage lives in
TimeSeriesChunk keyed by (hypertable, start_ns).
Fields§
§id: ChunkId§end_ns_exclusive: u64§row_count: u64§min_ts_ns: u64§max_ts_ns: u64§sealed: bool§ttl_override_ns: Option<u64>Optional per-chunk TTL override. None means “fall back to
the hypertable’s default TTL”. Setting this lets mixed-TTL
policies live inside the same hypertable — e.g. keep the
current month of data forever but expire everything older
than 90 days.
columnar_page: Option<PageLocation>Columnar-vs-row migration discriminant (PRD #850, Phase 1).
Some(loc) → this chunk was sealed columnar; its RDCC
ColumnBlock lives
at loc and reads decode the columnar form. None → a legacy
row-stored chunk served by the entity path (read-bridge lands in
#861). This MUST persist so pre-existing row-stored data is never
mis-read as columnar after a restart.
Implementations§
Source§impl ChunkMeta
impl ChunkMeta
pub fn new(id: ChunkId, end_ns_exclusive: u64) -> Self
Sourcepub fn format(&self) -> ChunkFormat
pub fn format(&self) -> ChunkFormat
The chunk’s storage format — the read-bridge dispatch key (#861).
Derived from the migration discriminant columnar_page: a recorded
RDCC ColumnBlock location means ChunkFormat::ColumnarV1, its
absence means the legacy ChunkFormat::Row form. This is the
format-version gate that lets old row chunks and new columnar chunks
coexist in one collection without a rewrite.
Sourcepub fn is_columnar(&self) -> bool
pub fn is_columnar(&self) -> bool
True when this chunk is stored in the columnar RDCC form.
pub fn observe(&mut self, ts_ns: u64)
Sourcepub fn effective_ttl_ns(&self, default_ttl_ns: Option<u64>) -> Option<u64>
pub fn effective_ttl_ns(&self, default_ttl_ns: Option<u64>) -> Option<u64>
Effective TTL = per-chunk override if present, otherwise the
hypertable default. None = the chunk has no automatic
expiry.
Sourcepub fn expiry_ns(&self, default_ttl_ns: Option<u64>) -> Option<u64>
pub fn expiry_ns(&self, default_ttl_ns: Option<u64>) -> Option<u64>
Absolute epoch-ns at which the chunk becomes droppable. Uses
max_ts_ns as the baseline — the newest row the chunk has
ever accepted — so an empty chunk (no rows yet) never
expires until at least one row lands.
pub fn is_expired_at(&self, now_ns: u64, default_ttl_ns: Option<u64>) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Forget for ChunkMeta
impl Freeze for ChunkMeta
impl Move for ChunkMeta
impl RefUnwindSafe for ChunkMeta
impl Send for ChunkMetawhere
RawVecInner: Send,
impl Sync for ChunkMetawhere
RawVecInner: Sync,
impl Unpin for ChunkMeta
impl UnsafeUnpin for ChunkMeta
impl UnwindSafe for ChunkMetawhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request