Skip to content
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

allow 0 as a valid truncation timestamp #440

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

rfratto
Copy link
Member

@rfratto rfratto commented Mar 1, 2021

PR Description

A remote_write timestamp of 0 preventing truncations from occurring. Ignoring 0s was an unnecessary safety measure, and only caused problems when considering the min/max WAL sample lifetime.

Which issue(s) this PR fixes

Closes #409.

Notes to the Reviewer

PR Checklist

  • CHANGELOG updated
  • Documentation added
  • Tests updated

A remote_write timestamp of 0 preventing truncations from occurring.
Ignoring 0s was an unnecessary safety measure, and only caused problems
when considering the min/max WAL sample lifetime.

Closes grafana#409.
@rfratto rfratto requested a review from mattdurham March 1, 2021 15:35
continue
ts := i.getRemoteWriteTimestamp() - i.cfg.MinWALTime.Milliseconds()
if ts < 0 {
ts = 0
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 is a perfectly valid timestamp and there was no reason to do this 🤷

@rfratto rfratto merged commit db711df into grafana:main Mar 1, 2021
@mattdurham mattdurham mentioned this pull request Sep 7, 2021
3 tasks
mattdurham pushed a commit that referenced this pull request Nov 11, 2021
A remote_write timestamp of 0 preventing truncations from occurring.
Ignoring 0s was an unnecessary safety measure, and only caused problems
when considering the min/max WAL sample lifetime.

Closes #409.
@rfratto rfratto deleted the truncate-with-failing-rw branch March 14, 2022 18:18
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Apr 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

max_wal_time unused if one remote_write never works
2 participants