Skip to content

convert: add backlog conversion date limit#46

Open
yuchen-db wants to merge 3 commits intothanos-io:mainfrom
yuchen-db:max-days-back
Open

convert: add backlog conversion date limit#46
yuchen-db wants to merge 3 commits intothanos-io:mainfrom
yuchen-db:max-days-back

Conversation

@yuchen-db
Copy link
Copy Markdown
Contributor

we ran into disk full issue converting backlogs that are already compacted to 14-day blocks. adding this flag to limit how far we go back

Signed-off-by: Yuchen Wang <yuchen.wang@databricks.com>
Signed-off-by: Yuchen Wang <yuchen.wang@databricks.com>
Signed-off-by: Yuchen Wang <yuchen.wang@databricks.com>
Comment thread convert/plan.go
type Planner struct {
// Do not create parquet blocks that are younger then this.
notAfter time.Time
// Do not create parquet blocks that are older then this.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

s/then/than/

Comment thread cmd/convert.go
if opts.maxDaysBack > 0 {
notBefore = time.Now().AddDate(0, 0, -opts.maxDaysBack).Truncate(24 * time.Hour)
}
plan := convert.NewPlanner(notAfter, notBefore, opts.maxDays).Plan(tsdbMetas, parquetMetas)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could values of notAfter, notBefore be logged, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants