Repository navigation
Conversation
…larAppenderV2 Signed-off-by: Bartek Plotka <[email protected]>
Signed-off-by: Bartek Plotka <[email protected]>
…tograms Signed-off-by: Bartek Plotka <[email protected]>
Signed-off-by: Bartek Plotka <[email protected]>
6be3702 to
71a89b4
Compare
| // It's up to the caller to decide if it's an ignorable error or not, plus | ||
| // it allows extra reporting (e.g. for Remote Write 2.0 X-Remote-Write-Written headers). | ||
| type AppendPartialError struct { | ||
| ExemplarErrors []error |
There was a problem hiding this comment.
I have been wondering about the error handling myself, due to grafana/mimir#16738
An idea I had was to not add a new field like ExemplarErrorIndexes, but allocate ExemplarErrors on first error right away at length(exemplars) , where exemplars is the input array. And then errors can be just assigned by index. The idea is that allocations are the most expensive operation so we'd want to avoid another allocation , plus possibly allocating due to append. WDYT?
There was a problem hiding this comment.
This should now concern #19941 instead. Can you make the comment there?
krajorama
left a comment
There was a problem hiding this comment.
Would you mind splitting this into two parts? One for exemplars and one for metadata? thanks!
Signed-off-by: Arve Knudsen <[email protected]>
71a89b4 to
e69b3a1
Compare
|
I've split into two PRs now @krajorama. This and #19941. I'll move this PR out of draft after I've looked it properly over. |
|
@krajorama @bwplotka PTAL. |
b321643 to
fa51d00
Compare
|
Thanks for this! Do we need to fix metadata duplication within a single appender? See #20000 (comment) -- I don't think this ever practically happen. And even if somebody does it because protocol allows it, then let's duplicate - it's not a big deal vs additional code and structures to validate this. In this case we can just document? Stale fix is valid. Can we propose state fix as a separate PR to main (it's orthogonal to AppV2 RW)? Again, I would only document duplication for now, but that can be separate fix as well Then this PR could be closed? |
RW2 repeats series metadata for each append. With
AppenderV2, a batched request could therefore write duplicate metadata WAL entries, while a stale-only request could omit metadata entirely.Regression coverage uses named, table-driven subtests for real HTTP receiver/TSDB/WAL paths, 1,000-sample metadata batches, stale metadata, mixed sample types, metadata transitions, and rollback.
Which issue(s) does the PR fix:
Follow-up to #19812, targeting its feature branch. Exemplar accounting is split into #19941.
Release notes for end users (ALL commits must be considered).
Reviewers should verify clarity and quality.