Commit Graph

22 Commits

Author SHA1 Message Date
Robert Fratto
b8920125c5 chore(dataobj): add configurable prefetching (#20946)
Signed-off-by: Robert Fratto <robertfratto@gmail.com>
2026-02-24 14:07:41 -05:00
Robert Fratto
f9bdab2fc8 chore(dataobj): restructure dataobjs to store metadata at the front of the file (#20865)
Signed-off-by: Robert Fratto <robertfratto@gmail.com>
2026-02-19 10:54:38 -05:00
Christian Haudum
a3017f2b13 chore(dataobj-consumer): Sort logs object-wide (#19231)
Sorting logs globally (object-wide per tenant) removes overlapping time ranges of sections in the objects.

Sections contain logs from multiple streams, and the ingest lag of streams may vary. This means that although logs of individual sections are sorted by timestamp, the overall sorting of logs is not guaranteed. Therefore sections are sorted with a k-way merge (SortMerge), which does over-query data in case the query would reach its result limit early.

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
2025-09-23 09:01:37 +02:00
benclive
3148a77966 chore: improve metastore Section calls (#19157) 2025-09-11 09:27:34 +00:00
Robert Fratto
642d826a00 chore(dataobj): make section tenancy a global construct (#18857)
Signed-off-by: Robert Fratto <robertfratto@gmail.com>
Co-authored-by: George Robinson <george.robinson@grafana.com>
2025-08-14 14:29:04 +00:00
Robert Fratto
100e259a8d chore(dataobj): introduce the concept of section info "extensions" (#18832) 2025-08-13 10:14:04 -04:00
Robert Fratto
d4b027ae0c chore(dataobj): return Object on Builder.Flush (#18622) 2025-08-06 12:52:28 -04:00
Robert Fratto
a237444f0d refactor(dataobj): invert dependency between dataobj and sections (#17762)
Originally, the dataobj package was a higher-level API around sections. This
design caused it to become a bottleneck:

* Implementing any new public behaviour for a section required bubbling it up
  to the dataobj API for it to be exposed, making it tedious to add new
  sections or update existing ones.

* The `dataobj.Builder` pattern was focused on constructing dataobjs for
  storing log data, which will cause friction as we build objects around other
  use cases. 

This PR builds on top of the foundation laid out by #17704 and #17708, fully
inverting the dependency between dataobj and sections:

* The `dataobj` package has no knowledge of what sections exist, and can now be
  used for writing and reading generic sections. Section packages now create
  higher-level APIs around the abstractions provided by `dataobj`.

* Section packages are now public, and callers interact directly with these
  packages for writing and reading section-specific data.

* All logic for a section (encoding, decoding, buffering, reading) is now fully
  self-contained inside the section package. Previously, the implementation of
  each section was spread across three packages
  (`pkg/dataobj/internal/encoding`, `pkg/dataobj/internal/sections/SECTION`,
  `pkg/dataobj`).

* Cutting a section is now a decision made by the caller rather than the
  section implementation. Previously, the logs section builder would create
  multiple sections. 

For the most part, this change is a no-op, with two exceptions:

1. Section cutting is now performed by the caller; however, this shouldn't
   result in any issues. 

2. Removing the high-level `dataobj.Stream` and `dataobj.Record` types will
   temporarily reduce the allocation gains from #16988. I will address this after
   this PR is merged.
2025-05-21 08:04:35 -04:00
Robert Fratto
7b0d6d7144 chore(dataobj): Migrate to dynamic section types (#17708) 2025-05-14 12:51:44 -04:00
Robert Fratto
1adb1e39d3 chore(dataobj): add initial high-level APIs for reading streams and log records (#15974) 2025-01-27 11:29:32 -05:00
Robert Fratto
5929b05a64 chore(dataobj): deduplicate decoder code across bucket and io.ReadSeeker (#15945) 2025-01-27 08:37:45 -05:00
Robert Fratto
93cee63f59 chore(dataobj): add compression ratio and final object size distributions (#15848) 2025-01-23 11:26:41 -05:00
Robert Fratto
948f5c5f3e chore(dataobj): Reintroduce sorting of the logs section (#15906) 2025-01-23 11:14:53 -05:00
Robert Fratto
64665c4595 chore(dataobj): promote metadata types to hold uint64 instead of uint32 (#15850) 2025-01-21 07:19:30 +01:00
Robert Fratto
9be147430e chore(dataobj): fix dataobj_config metrics (#15824) 2025-01-17 11:27:37 -05:00
Robert Fratto
093e36af58 chore(dataobj): instrument data objects (#15803) 2025-01-16 15:52:37 -05:00
Robert Fratto
a35321c100 chore(dataobj): Prefix bucket and cache built object until flushing succeeds (#15796) 2025-01-16 10:28:08 -05:00
Robert Fratto
b4d067845a chore(dataobj): use LRU cache for parsing labels (#15792) 2025-01-16 08:36:27 -05:00
Cyril Tovena
a9c0015f3c feat(dataobj): add support for loading config via flags (#15791) 2025-01-16 14:24:04 +01:00
Robert Fratto
127ad5326f chore(dataobj): support for building and flushing data objects (#15780) 2025-01-16 10:39:34 +01:00
Robert Fratto
13853bbf38 chore(dataobj): use logproto.Stream for single append (#15772) 2025-01-15 16:33:54 +01:00
Robert Fratto
e838ee3181 chore(dataobj): add skeleton for public API to build objects (#15719) 2025-01-13 13:00:51 -05:00