Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Prevent creation of block dirs with zero samples #245

Closed

Conversation

nipuntalukdar
Copy link
Contributor

No description provided.

@nipuntalukdar
Copy link
Contributor Author

Made a small change that will prevent creation of block dirs with zero samples during compaction.

@gouthamve
Copy link
Collaborator

Instead of this can we return super early? Like right after the defer?

@nipuntalukdar
Copy link
Contributor Author

I think we cannot return early because before deferred function is called, the tmp directories might have been created. Also, the error will be very infrequent and hence shouldn't have any impact by allowing proper cleanup flow.

@gouthamve
Copy link
Collaborator

Oh no. https://github.com/prometheus/tsdb/pull/245/files#diff-43297cfd6441b52c54c50d646a564339R419 this is where we create the tmp directory. We removeAll before just to make sure but there should be no such temp dir.

@krasi-georgiev
Copy link
Contributor

superseded by: #374

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants