-
Couldn't load subscription status.
- Fork 836
Refactor: Unify metadata and samples sends to ingesters #2410
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -373,10 +373,8 @@ func (i *Ingester) Push(ctx context.Context, req *client.WriteRequest) (*client. | |
| } | ||
|
|
||
| if len(req.Metadata) > 0 { | ||
| // Given requests can only contain either metadata or samples, no-op if there is metadata for now. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically, this is "no longer true" from an implementation perspective. The remote write protocol only sends metadata or samples (for now) but IMO that comment/responsibility belongs in the distributor. The ingester should operate under no assumption that you'd receive one or the other if we can (e.g. no increase of complexity). Obviously, this is my own personal opinion with what I know about the system, but others feel free to suggest any alternatives. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we're going to handle samples and metadata in the same push, then I would suggest that we return errors for them separately. As it is now, errors reported by ingesters will be counted for both samples and metadata (provided both were present in the request). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry Peter, I'm not following your comment. With this change, we're no longer making assumptions that a The error handling in The comment I originally left in the distributors is an operational concern, but for the code itself, it wouldn't make a difference - that is indented. |
||
| logger := util.WithContext(ctx, util.Logger) | ||
| level.Debug(logger).Log("msg", "metadata received in the ingester", "count", len(req.Metadata)) | ||
| return &client.WriteResponse{}, nil | ||
| } | ||
|
|
||
| for _, ts := range req.Timeseries { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.