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
lib/vmselectapi: do not send empty label names for labelNames request #4936
Conversation
it breaks cluster communication, since vmselect incorrectly reads request buffer, leaving unread data on it #4932
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
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## cluster #4936 +/- ##
===========================================
- Coverage 59.32% 59.31% -0.02%
===========================================
Files 394 394
Lines 74759 74759
===========================================
- Hits 44353 44344 -9
- Misses 27976 27978 +2
- Partials 2430 2437 +7 ☔ View full report in Codecov by Sentry. |
lib/vmselectapi/server.go
Outdated
@@ -919,6 +923,9 @@ func (s *Server) processTenants(ctx *vmselectRequestCtx) error { | |||
|
|||
// Send tenants to vmselect | |||
for _, tenant := range tenants { | |||
if len(tenant) == 0 { | |||
return fmt.Errorf("BUG: unexpected empty tenant name") |
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 think it is better to just skip an empty tenant and log this issue instead of returning the error, since this error makes the tenant API unusable.
@f41gh7 , thanks for the bugfix! |
it breaks cluster communication, since vmselect incorrectly reads request buffer, leaving unread data on it #4932