Skip to content
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

streaming: fix a couple bugs #9745

Merged
merged 3 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/cache-types/streaming_health_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type StreamingHealthServices struct {
// so using a shorter TTL ensures the cache entry expires sooner.
func (c *StreamingHealthServices) RegisterOptions() cache.RegisterOptions {
opts := c.RegisterOptionsBlockingRefresh.RegisterOptions()
opts.LastGetTTL = 10 * time.Minute
opts.LastGetTTL = 20 * time.Minute
return opts
}

Expand Down
5 changes: 4 additions & 1 deletion agent/health_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ func (s *HTTPHandlers) healthServiceNodes(resp http.ResponseWriter, req *http.Re
return nil, nil
}

useStreaming := s.agent.config.UseStreamingBackend && args.MinQueryIndex > 0
// useStreaming when a blocking query is requested, but not when the near
// query parameter is set, because that requires data only available to the server
// to sort the results.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something we can actually fix later for streaming?

If a fix is possible but just not simple enough to do right away this seems like a good move to unblock folks. But if it's more that this feature is never going to be practice for streaming for some reason, I wonder if we should actually not fallback now and just make it a hard limitation of the feature that we document. I'd rather folks trying it out find out these limitations before it's GA etc. if we aren't actually going to have a fix for them.

I've not thought though if it's feasible to ever support this for streaming?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote this yesterday before it was merged but forgot to actually submit it :( Sorry. Not to late though if we do decide to do something else for next release!

useStreaming := s.agent.config.UseStreamingBackend && args.MinQueryIndex > 0 && args.Source.Node == ""
args.QueryOptions.UseCache = s.agent.config.HTTPUseCache && (args.QueryOptions.UseCache || useStreaming)

out, md, err := s.agent.rpcClientHealth.ServiceNodes(req.Context(), args)
Expand Down
1 change: 0 additions & 1 deletion agent/submatview/materializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ func (m *Materializer) reset() {

m.view.Reset()
m.index = 0
m.retryWaiter.Reset()
}

func (m *Materializer) updateView(events []*pbsubscribe.Event, index uint64) error {
Expand Down