-
Notifications
You must be signed in to change notification settings - Fork 820
Ingester can now flush only specified users. #4073
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
Ingester can now flush only specified users. #4073
Conversation
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.
Flawless job! 👏 I just have a comment about using the query string parameter vs the canonical X-Scope-OrgID
but, a part from this, LGTM!
pkg/ingester/ingester_v2.go
Outdated
}() | ||
} | ||
|
||
const waitParam = "wait" |
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.
[nit] I would define it close to the tenant param (if we'll keep it), given they both apply to the same API endpoint.
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.
I suggest we keep it. Moving to tenantParam
.
Thank you for review, I've addressed your comments now. |
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
b1d4e81
to
5310d07
Compare
Signed-off-by: Peter Štibraný <peter.stibrany@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.
Good job, LGTM! I just left a comment about AllowedTenants
: up to you if it's worth using it.
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
What this PR does: This PR adds
tenant
parameter to/flush
handler. When used, only specific tenant is flushed and only this tenants' blocks are shipped.tenant
parameter may be used multiple times to specify many tenants at once.This PR also adds
wait
parameter to/flush
method, which makes the method synchronous -- it only returns when compact + ship cycle have finished. Note that/flush
still only returns 204, no matter the result of compaction or shipment.These two enhancements are only available when using blocks storage.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]