-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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: replace agent/cache with submatview.Store #10112
Changes from all commits
3d52abb
ddddbdb
c574108
7d13465
1d9d7d0
832f1a2
c106399
9854c42
6ebb0f8
6f29fa0
55a677b
4fb2ba9
2a26085
0558586
a16c377
e229b87
10ec9c2
5fa0dea
c932833
034c5c5
a2986eb
dacf500
79a54f2
d953741
46b7d0b
23e1cd6
1139889
31cd580
3a27fce
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
streaming: fixes a bug that would cause context cancellation errors when a cache entry expired while requests were active. | ||
``` |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
package consul | ||
|
||
import ( | ||
"github.com/hashicorp/consul/agent/grpc" | ||
"github.com/hashicorp/go-hclog" | ||
"google.golang.org/grpc" | ||
|
||
"github.com/hashicorp/consul/agent/pool" | ||
"github.com/hashicorp/consul/agent/router" | ||
"github.com/hashicorp/consul/agent/token" | ||
"github.com/hashicorp/consul/tlsutil" | ||
"github.com/hashicorp/go-hclog" | ||
) | ||
|
||
type Deps struct { | ||
|
@@ -15,5 +16,9 @@ type Deps struct { | |
Tokens *token.Store | ||
Router *router.Router | ||
ConnPool *pool.ConnPool | ||
GRPCConnPool *grpc.ClientConnPool | ||
GRPCConnPool GRPCClientConner | ||
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. This was done so that tests which use |
||
} | ||
|
||
type GRPCClientConner interface { | ||
ClientConn(datacenter string) (*grpc.ClientConn, error) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,13 +219,6 @@ func (s *HTTPHandlers) healthServiceNodes(resp http.ResponseWriter, req *http.Re | |
return nil, nil | ||
} | ||
|
||
useStreaming := s.agent.config.UseStreamingBackend && args.MinQueryIndex > 0 && !args.Ingress | ||
args.QueryOptions.UseCache = s.agent.config.HTTPUseCache && (args.QueryOptions.UseCache || useStreaming) | ||
|
||
if args.QueryOptions.UseCache && useStreaming && args.Source.Node != "" { | ||
return nil, BadRequestError{Reason: "'near' query param can not be used with streaming"} | ||
} | ||
Comment on lines
-222
to
-227
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. This logic has moved into |
||
|
||
out, md, err := s.agent.rpcClientHealth.ServiceNodes(req.Context(), args) | ||
if err != nil { | ||
return nil, err | ||
|
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 wonder if it's worth adding either in this entry or a separate one, an explicit reference/link to the scalability challenge and the reduction in the long tail of deliveries at scale? Not important though just a thought.