Skip to content

WIP: Support 1w, 1y for retention and table period #2244

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

Closed
wants to merge 1 commit into from

Conversation

gouthamve
Copy link
Contributor

@gouthamve gouthamve commented Mar 10, 2020

This will let us 1w in the schema config YAML and also lets us set the retention as 2y etc. If this looks good, I'll go ahead and change docs, etc.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

The Prometheus code has a comment:
// This type should not propagate beyond the scope of input/output processing.
which makes me wonder if the dozens of changes are in the right direction.

tablePeriod = 7 * 24 * time.Hour
gracePeriod = 15 * time.Minute
tablePeriod = model.Duration(7 * 24 * time.Hour)
gracePeriod = model.Duration(15 * time.Minute)
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I can see this is always cast to a time.Duration so why not leave it as that?

@@ -115,9 +115,14 @@ type ProvisionConfig struct {
func (cfg *TableManagerConfig) RegisterFlags(f *flag.FlagSet) {
f.BoolVar(&cfg.ThroughputUpdatesDisabled, "table-manager.throughput-updates-disabled", false, "If true, disable all changes to DB capacity")
f.BoolVar(&cfg.RetentionDeletesEnabled, "table-manager.retention-deletes-enabled", false, "If true, enables retention deletes of DB tables")
f.DurationVar(&cfg.RetentionPeriod, "table-manager.retention-period", 0, "Tables older than this retention period are deleted. Note: This setting is destructive to data!(default: 0, which disables deletion)")

cfg.RetentionPeriod = model.Duration(0)
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this required?

@gouthamve
Copy link
Contributor Author

Closing in favor of #2252

@gouthamve gouthamve closed this Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants