-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/metrics/wal: always write series records to WAL, even on rollback #4619
Merged
Conversation
This file contains 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
If a new series is introduced in a storage.Appender instance, that series should be written to the WAL once the storage.Appender is closed, even on Rollback. Previously, new series would only be written to the WAL when calling Commit. However, because the series is stored in memory regardless, subsequent calls to Commit may write samples to the WAL which reference a series ID which that was never written. Port of prometheus/prometheus#12592
Is there a good way to add tests to this? |
@mattdurham I added a test case, PTAL |
mattdurham
approved these changes
Jul 27, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
rfratto
added a commit
to rfratto/agent
that referenced
this pull request
Jul 27, 2023
…grafana#4619) If a new series is introduced in a storage.Appender instance, that series should be written to the WAL once the storage.Appender is closed, even on Rollback. Previously, new series would only be written to the WAL when calling Commit. However, because the series is stored in memory regardless, subsequent calls to Commit may write samples to the WAL which reference a series ID which that was never written. Port of prometheus/prometheus#12592 (cherry picked from commit 3837d47)
rfratto
added a commit
that referenced
this pull request
Jul 27, 2023
* prometheus.operator.*: fix UI issues (#4538) (cherry picked from commit 11e0087) * Fix nil reference oauth2 (#4548) * Fix nil reference oauth2 * Update CHANGELOG.md Co-authored-by: Robert Fratto <[email protected]> --------- Co-authored-by: Robert Fratto <[email protected]> (cherry picked from commit bbfbf37) * pkg/metrics/wal: always write series records to WAL, even on rollback (#4619) If a new series is introduced in a storage.Appender instance, that series should be written to the WAL once the storage.Appender is closed, even on Rollback. Previously, new series would only be written to the WAL when calling Commit. However, because the series is stored in memory regardless, subsequent calls to Commit may write samples to the WAL which reference a series ID which that was never written. Port of prometheus/prometheus#12592 (cherry picked from commit 3837d47) * Fix issue with fips on behalf of @andrewimeson (#4622) (cherry picked from commit 234b056) * agentctl: add journald support (#4544) Add journald support into agentctl so `grafana-agentctl test-logs` functions properly when using a config which reads log entries from the systemd journal. Fixes #4520. (cherry picked from commit f254860) * [release-v0.35] prepare for release v0.35.2 (cherry picked from commit 138dc34) --------- Co-authored-by: mattdurham <[email protected]>
dwalker-sabiogroup
pushed a commit
to dwalker-sabiogroup/agent
that referenced
this pull request
Jul 28, 2023
…grafana#4619) If a new series is introduced in a storage.Appender instance, that series should be written to the WAL once the storage.Appender is closed, even on Rollback. Previously, new series would only be written to the WAL when calling Commit. However, because the series is stored in memory regardless, subsequent calls to Commit may write samples to the WAL which reference a series ID which that was never written. Port of prometheus/prometheus#12592
clayton-cornell
pushed a commit
that referenced
this pull request
Aug 14, 2023
…#4619) If a new series is introduced in a storage.Appender instance, that series should be written to the WAL once the storage.Appender is closed, even on Rollback. Previously, new series would only be written to the WAL when calling Commit. However, because the series is stored in memory regardless, subsequent calls to Commit may write samples to the WAL which reference a series ID which that was never written. Port of prometheus/prometheus#12592
clayton-cornell
pushed a commit
that referenced
this pull request
Aug 14, 2023
…#4619) If a new series is introduced in a storage.Appender instance, that series should be written to the WAL once the storage.Appender is closed, even on Rollback. Previously, new series would only be written to the WAL when calling Commit. However, because the series is stored in memory regardless, subsequent calls to Commit may write samples to the WAL which reference a series ID which that was never written. Port of prometheus/prometheus#12592
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
frozen-due-to-age
Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.
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.
If a new series is introduced in a storage.Appender instance, that series should be written to the WAL once the storage.Appender is closed, even on Rollback.
Previously, new series would only be written to the WAL when calling Commit. However, because the series is stored in memory regardless, subsequent calls to Commit may write samples to the WAL which reference a series ID which that was never written.
Port of prometheus/prometheus#12592