-
Notifications
You must be signed in to change notification settings - Fork 803
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
Option to include quorum zone results for DistributorQueryable metadata API #5779
Conversation
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
pkg/ring/replication_set.go
Outdated
if _, ok := resultsPerZone[res.instance.Zone]; !ok { | ||
resultsPerZone[res.instance.Zone] = make([]interface{}, 0, len(r.Instances)) | ||
} | ||
resultsPerZone[res.instance.Zone] = append(resultsPerZone[res.instance.Zone], res.res) |
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 have 2 new methods on the tracker interface to hide this logic?
- tracker.RecordResult(instance, result)
- GetQuerumResults
- That for sone aware will return only the zonal results?
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.
Updated. I combine RecordResult
to the existing done
method.
GetResults
is a general method to return results. Quorum or not is controlled via the flag
Signed-off-by: Ben Ye <benye@amazon.com>
LGTM!! Nice work! |
Signed-off-by: Ben Ye <benye@amazon.com>
What this PR does:
Added a new flag
-distributor.zone-results-quorum-metadata
to only include quorum number of zones as query results of metadata APIs like label names, values and series.This helps improve performance and latency. Image we have 3 zones. Now when zone awareness is enabled, we wait for all ingester results from at least 2 zones to be received before returning the results. However, for results from the 3rd zone, we are still trying to merge them. This can be inefficient as the results from 3rd zone are basically duplicates.
Thus, this pr tries to only use results from 2 zones. By having less data to merge, improve the latency as well as memory usage.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]