Partition time-series parts by date and prune them on a windowed PEEK #15
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
zoo/eve#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
ParquetTsdbUnitstores immutable parts and reads every visible part on every query:engine::execute(both the Arrow fast path and the JSON fallback) starts fromstore::read_parts/read_batches, and the filter is applied afterwards. A windowedPEEKtherefore costs O(total history), not O(window).Measured on the current adapter (debug build, one compacted part, 1 088 symbols × 365 days = 397 120 rows):
PEEKwindow (3 days, no limit): 3.37 sPEEKwindow +sort -date+limit 3: 3.41 sPEEKone symbol, same window: 2.87 sFor a service that appends ~1 088 series points a day and reads a 3-day window at every boundary, this grows linearly with the run's age. Row-group statistics (#10) skip data inside a part, but they still open and scan every part; date-partitioned parts would let a windowed query avoid most parts altogether.
Scope
[minDate, maxDate]in the manifest alongside the file name, or derive it from the part's statistics once when the part is written.date/dateTimekey) into a closed/open interval; read only parts whose span overlaps it. A query without a date predicate, or a predicate the translator does not understand, reads all parts (conservative, no false negatives).parts.jsonhas no span metadata (or legacy parts) is read as today and can be repartitioned onserve/compaction; no data loss, no silent empty reads.adr/parquet.mddescribes.Acceptance criteria
eve_e2etsdb tests and semantics unchanged; a query with no date filter returns the same rows and order.servepreserve or rebuild the span metadata; a crash between part write and manifest switch leaves no visible partial part.cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test -p eve_tsdb_parquet,cargo test -p eve_e2e --test tsdb --test apppass.adr/parquet.mddocuments the partition layout, the manifest span metadata, pruning and the fallback.Non-goals
TsdbUnitAPI or the query language.