[PRW 2.0] write_handler: Support for rc.2 spec & improved error handling for v2.#14427
Merged
[PRW 2.0] write_handler: Support for rc.2 spec & improved error handling for v2.#14427
Conversation
b8beed1 to
634504d
Compare
cstyan
reviewed
Jul 5, 2024
| errors.Is(err, storage.ErrDuplicateSampleForTimestamp) || | ||
| errors.Is(err, storage.ErrTooOldSample) { | ||
| // TODO(bwplotka): Not too spammy log? | ||
| level.Error(h.logger).Log("msg", "Out of order sample from remote write", "err", err.Error(), "series", ls.String(), "timestamp", s.Timestamp) |
Member
There was a problem hiding this comment.
potentially, can we use the dedupe logger here?
Member
Author
There was a problem hiding this comment.
Hm, I see
prometheus/util/logging/dedupe.go
Line 54 in c954cd9
Member
Author
There was a problem hiding this comment.
since we log timestamp, series etc, this will not help I think.. I would say let's fix in further PRs if this becomes a problem somewhere.
a3c47c1 to
e133aac
Compare
e133aac to
baae06b
Compare
…ing for v2. Fixes: #14359 Signed-off-by: bwplotka <[email protected]>
Signed-off-by: bwplotka <[email protected]>
Signed-off-by: bwplotka <[email protected]>
Signed-off-by: bwplotka <[email protected]>
baae06b to
6ca09c0
Compare
Signed-off-by: bwplotka <[email protected]>
6ca09c0 to
536a69a
Compare
bwplotka
added a commit
that referenced
this pull request
Jul 9, 2024
Chained on top of #14427 Fixes #14359 Signed-off-by: bwplotka <[email protected]>
This was referenced Jul 9, 2024
bwplotka
added a commit
that referenced
this pull request
Jul 9, 2024
Chained on top of #14427 Fixes #14359 Signed-off-by: bwplotka <[email protected]>
cstyan
reviewed
Jul 9, 2024
Signed-off-by: bwplotka <[email protected]>
Co-authored-by: Callum Styan <[email protected]> Signed-off-by: Bartlomiej Plotka <[email protected]>
bwplotka
commented
Jul 11, 2024
| if len(badRequestErrs) == 0 { | ||
| return samplesWithoutMetadata, 0, nil | ||
| } | ||
| // TODO(bwplotka): Better concat formatting? Perhaps add size limit? |
Member
Author
There was a problem hiding this comment.
bwplotka
added a commit
that referenced
this pull request
Jul 11, 2024
Chained on top of #14427 Fixes #14359 Signed-off-by: bwplotka <[email protected]>
bwplotka
added a commit
that referenced
this pull request
Jul 11, 2024
Chained on top of #14427 Fixes #14359 Signed-off-by: bwplotka <[email protected]>
bwplotka
added a commit
that referenced
this pull request
Jul 11, 2024
Chained on top of #14427 Fixes #14359 Signed-off-by: bwplotka <[email protected]>
bwplotka
added a commit
that referenced
this pull request
Jul 11, 2024
Chained on top of #14427 Fixes #14359 Signed-off-by: bwplotka <[email protected]>
cstyan
approved these changes
Jul 11, 2024
bwplotka
added a commit
that referenced
this pull request
Jul 12, 2024
Chained on top of #14427 Fixes #14359 Signed-off-by: bwplotka <[email protected]>
bwplotka
added a commit
that referenced
this pull request
Jul 19, 2024
…4444) * [PRW 2.0] Added Sender support for Response Stats. Chained on top of #14427 Fixes #14359 Signed-off-by: bwplotka <[email protected]> * Addressed comments. Signed-off-by: bwplotka <[email protected]> * move write stats to it's own file Signed-off-by: Callum Styan <[email protected]> * Clean up header usage Signed-off-by: Callum Styan <[email protected]> * add missing license to new stats file Signed-off-by: Callum Styan <[email protected]> * Addressed all comments. Signed-off-by: bwplotka <[email protected]> --------- Signed-off-by: bwplotka <[email protected]> Signed-off-by: Callum Styan <[email protected]> Co-authored-by: Callum Styan <[email protected]>
kushalShukla-web
pushed a commit
to kushalShukla-web/prometheus
that referenced
this pull request
Jul 23, 2024
…ing for v2. (prometheus#14427) * [PRW 2.0] write_handler: Support for rc.2 spec & improved error handling for v2. Fixes: prometheus#14359 Signed-off-by: bwplotka <[email protected]> * Addressed Callum comments. Signed-off-by: bwplotka <[email protected]> * Added missing lock on flush. Signed-off-by: bwplotka <[email protected]> * Fixed lint. Signed-off-by: bwplotka <[email protected]> * Added tests. Signed-off-by: bwplotka <[email protected]> * Addressed Callum's comments & updated re spec. Signed-off-by: bwplotka <[email protected]> * Update storage/remote/write_handler_test.go Co-authored-by: Callum Styan <[email protected]> Signed-off-by: Bartlomiej Plotka <[email protected]> --------- Signed-off-by: bwplotka <[email protected]> Signed-off-by: Bartlomiej Plotka <[email protected]> Co-authored-by: Callum Styan <[email protected]> Signed-off-by: kushagra Shukla <[email protected]>
kushalShukla-web
pushed a commit
to kushalShukla-web/prometheus
that referenced
this pull request
Jul 25, 2024
…ing for v2. (prometheus#14427) * [PRW 2.0] write_handler: Support for rc.2 spec & improved error handling for v2. Fixes: prometheus#14359 Signed-off-by: bwplotka <[email protected]> * Addressed Callum comments. Signed-off-by: bwplotka <[email protected]> * Added missing lock on flush. Signed-off-by: bwplotka <[email protected]> * Fixed lint. Signed-off-by: bwplotka <[email protected]> * Added tests. Signed-off-by: bwplotka <[email protected]> * Addressed Callum's comments & updated re spec. Signed-off-by: bwplotka <[email protected]> * Update storage/remote/write_handler_test.go Co-authored-by: Callum Styan <[email protected]> Signed-off-by: Bartlomiej Plotka <[email protected]> --------- Signed-off-by: bwplotka <[email protected]> Signed-off-by: Bartlomiej Plotka <[email protected]> Co-authored-by: Callum Styan <[email protected]>
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.
Fixes: #14359, but also refactors v2 error handling to support partial writes (for non-retriable errors) and adds extensive tests for stats and error handling in general.