-
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
Fix return values of Matrix and Vector during query range in QueryShardingMiddleware #4457
Conversation
Nice let's verify with a test |
Tried writing quick test yesterda, but realized its bit tricky. As these handlers are setup inside initQueryWorker(which needs lots of dependency) plus these handlers are available inside I will split setting up this handlers to separate function. So easy to test only the middleware chaining. |
Signed-off-by: Kaviraj <[email protected]>
Signed-off-by: Kaviraj <[email protected]>
92e1f49
to
dad1106
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.
LGTM
Can you test after and before in dev please too ? |
Before fix
After fix
NOTE: response |
Nice work kavi ❤️ |
Can you sync back on the issue to make sure it was runing on single binary just to make sure we didn;'t miss anything please. |
@cyriltovena Retested today, with Grafana 8.2.1 and Loki in distributed mode, using image docker.io/grafana/loki:2.3.0 for the various components.
Error in distributed mode |
What this PR does / why we need it:
During querysharding, when result type is either Matrix or Vector and when the results are empty, instead of returning empty responses, it return
nil
which breaks the final JSON encoding.Which issue(s) this PR fixes:
Fixes: #4420
Special notes for your reviewer:
NA
Checklist