-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add filter parameter to rebound so lines can be deleted by the compactor #5879
Add filter parameter to rebound so lines can be deleted by the compactor #5879
Conversation
pkg/storage/stores/shipper/compactor/deletion/delete_request.go
Outdated
Show resolved
Hide resolved
pkg/storage/stores/shipper/compactor/deletion/delete_request.go
Outdated
Show resolved
Hide resolved
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.
This looks awesome. I think there are just a couple of QOL and efficiency changes
89ce10e
to
6fa08a4
Compare
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.
A nit about commented out code and a question about when to add the endpoints.
Otherwise LGTM
pkg/storage/stores/shipper/compactor/deletion/validation_test.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
79636d6
to
48166fb
Compare
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.
Overall changes look good to me. Left a few minor suggestions.
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
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.
Sorry, I missed a case and found a small problem. Can you please take care of that as well? Please let me know if it is not clear or if I got something wrong.
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
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.
Just some very minor non-blocking nits.
Nice work, the changes look great!
tc.expectedResp.nonDeletedIntervals[idx].Interval.End, | ||
nonDeletedIntervals[idx].Interval.End, | ||
) | ||
} |
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.
Let us also add a nil vs non nil check when the delete request is with lblWithFilter
?
@@ -0,0 +1,3 @@ | |||
package filter | |||
|
|||
type Func func(string) bool |
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.
Is it possible to either move this somewhere relevant like chunks or deletion package? It looks out of place to me.
The other option is to add more context to it if moving it is not possible due to circular dependency.
Add filter functionality to the delete functionality of the compactor. This is hidden behind the "filter-and-delete" value of the deletion_mode config setting.
A filter function is added to the intervals sent to the Rebound function. This removes lines that match the given DeleteRequest.
Checklist
CHANGELOG.md
about the changes.Signed-off-by: Michel Hollands michel.hollands@grafana.com