Repository navigation
Conversation
krajorama
commented
Jul 21, 2026
krajorama
commented
Jul 21, 2026
bwplotka
reviewed
Jul 21, 2026
| // Only update metadata in WAL if the metadata-wal-records feature is enabled. | ||
| // Without this feature, metadata is not persisted to WAL. | ||
| if h.appendMetadata { | ||
| if _, err = app.UpdateMetadata(ref, ls, m); err != nil { |
Member
There was a problem hiding this comment.
Can we switch to inline Append for this and avoid #19250 (comment) 🤔
This was referenced Aug 5, 2026
krajorama
force-pushed
the
krajo/rw2-receiver-appenderv2
branch
2 times, most recently
from
August 18, 2026 09:18
b1d0b73 to
b2237fa
Compare
Part of the migration off the V1 storage.Appender interface (#17632). Depends on the Remote Write 1.0 migration. The Remote Write 2.x receiver path (writeHandler.writeV2 / appendV2) is ported from V1 storage.Appender to storage.AppenderV2, matching the RW 1.0 path. - Start timestamps are now passed directly as the AppenderV2.Append `st` parameter; the appender owns ST zero-sample injection, so the explicit AppendSTZeroSample / AppendHistogramSTZeroSample calls (and the handleHistogramZeroSample helper) are removed. The receiver still gates on the ingestSTZeroSample flag, which is enabled together with the TSDB/agent EnableSTAsZeroSample option. - Exemplars and metadata continue to use the standalone AppendExemplar / UpdateMetadata calls, now provided by remoteWriteAppenderV2 via the optional storage.ExemplarAppenderV2 / storage.MetadataUpdaterV2 capabilities. With both RW 1.0 and 2.x on AppenderV2, the V1 appendable is no longer used: NewWriteHandler drops its storage.Appendable parameter and the now-dead remoteWriteAppender wrapper is removed. The write_handler mock gained a V2 appender that injects ST zero samples so the existing assertions continue to hold. Signed-off-by: György Krajcsovits <[email protected]> Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: György Krajcsovits <[email protected]>
krajorama
force-pushed
the
krajo/rw2-receiver-appenderv2
branch
from
August 18, 2026 10:54
b2237fa to
daa409d
Compare
This was referenced Aug 19, 2026
Member
Author
|
favor #19457 over this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #17632. Stacked on top of #19250 (Remote Write 1.0 migration) — base branch is
krajo/rw1-receiver-appenderv2, so review only the top commit here. Merge/rebase after #19250.What
The Remote Write 2.x receiver path (
writeHandler.writeV2/appendV2) is ported from V1storage.Appendertostorage.AppenderV2, matching the RW 1.0 path from #19250.AppenderV2.Appendstparameter; the appender owns ST zero-sample injection, so the explicitAppendSTZeroSample/AppendHistogramSTZeroSamplecalls (and thehandleHistogramZeroSamplehelper) are removed. The receiver still gates oningestSTZeroSample, which the same feature flag enables together with the TSDB/agentEnableSTAsZeroSampleoption (cmd/prometheus/main.go), so behaviour is preserved.AppendExemplar/UpdateMetadatacalls, now provided byremoteWriteAppenderV2via the optionalstorage.ExemplarAppenderV2/storage.MetadataUpdaterV2capabilities introduced in storage/remote: migrate Remote Write 1.0 receiver to AppenderV2 #19250.With both RW 1.0 and 2.x on
AppenderV2, the V1 appendable is no longer used:NewWriteHandlerdrops itsstorage.Appendableparameter and the now-deadremoteWriteAppenderwrapper is removed (net −52 lines).Tests
The
write_handlermock gained a V2 appender that injects ST zero samples, so the existing V2-message assertions (including the ST zero-sample expectations) continue to hold unchanged.