Allow partial data in tenant-federation#7232
Allow partial data in tenant-federation#7232SungJin1212 wants to merge 5 commits intocortexproject:masterfrom
Conversation
67997cb to
cf71562
Compare
| res, err := job.querier.Select(start, end, allUnrelatedMatchers...) | ||
| if err != nil { | ||
| if m.allowPartialData { | ||
| return nil |
| if err != nil { | ||
| return errors.Wrapf(err, "error exemplars querying %s %s", job.id, err) | ||
| if m.allowPartialData { | ||
| return nil |
There was a problem hiding this comment.
do we need to add a warning ?
I'd love to add a warning here, but the upstream interface doesn't support returning warnings like |
|
Looking at #6526 I see partial data for metadata was not implemented because prometheus does not support it. Maybe we should do the same here? Same for exemplars. @SungJin1212 How does grafana or perses react with errors in these APIs? maybe it just ignores it |
|
@friedrichg Yeah, the Prometheus interface doesn't support returning warnings. Should we disable partial data for exemplars and metadata? |
friedrichg
left a comment
There was a problem hiding this comment.
Ignoring the error is bad at least send a warning to the logs. I feel.
cf71562 to
bac8e6a
Compare
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
bac8e6a to
927d8a2
Compare
This PR introduces experimental flag
-tenant-federation.allow-partial-datafor partial responses when using Tenant Federation.Currently, when querying multiple tenants via federation, a failure in a single tenant causes the entire query to fail. With this change, users can opt-in to a mode where errors from individual tenants are treated as warnings, allowing partial results from successful tenants to be returned.
This is particularly useful when using the regex resolver (e.g., X-Scope-OrgID: user-.*). When dynamically matching a large number of tenants, a single failing tenant will no longer block the entire query result.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]