-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Dynamic Config for safe keepalive rollout #7809
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 6 commits
805b6e7
7ebede0
21a8445
bfa31b0
2a40732
aba1f7e
6fced5a
988d5c3
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 |
|---|---|---|
|
|
@@ -73,6 +73,7 @@ type ( | |
| // See LifetimeHooksModule for detail | ||
| var Module = fx.Options( | ||
| persistenceClient.Module, | ||
| dynamicconfig.Module, | ||
| fx.Provide(HostNameProvider), | ||
| fx.Provide(TimeSourceProvider), | ||
| cluster.MetadataLifetimeHooksModule, | ||
|
|
@@ -339,6 +340,7 @@ func RPCFactoryProvider( | |
| resolver *membership.GRPCResolver, | ||
| tracingStatsHandler telemetry.ClientStatsHandler, | ||
| monitor membership.Monitor, | ||
| dc *dynamicconfig.Collection, | ||
| ) (common.RPCFactory, error) { | ||
| frontendURL, frontendHTTPURL, frontendHTTPPort, frontendTLSConfig, err := getFrontendConnectionDetails(cfg, tlsConfigProvider, resolver) | ||
| if err != nil { | ||
|
|
@@ -349,7 +351,9 @@ func RPCFactoryProvider( | |
| if tracingStatsHandler != nil { | ||
| options = append(options, grpc.WithStatsHandler(tracingStatsHandler)) | ||
| } | ||
| return rpc.NewFactory( | ||
| enableServerKeepalive := dynamicconfig.EnableInternodeServerKeepAlive.Get(dc)() | ||
| enableClientKeepalive := dynamicconfig.EnableInternodeClientKeepAlive.Get(dc)() | ||
| factory := rpc.NewFactory( | ||
| cfg, | ||
| svcName, | ||
| logger, | ||
|
|
@@ -360,7 +364,11 @@ func RPCFactoryProvider( | |
| frontendTLSConfig, | ||
| options, | ||
| monitor, | ||
| ), nil | ||
| ) | ||
| factory.EnableInternodeServerKeepalive = enableServerKeepalive | ||
| factory.EnableInternodeClientKeepalive = enableClientKeepalive | ||
| logger.Info(fmt.Sprintf("RPC factory created. enableServerKeepalive: %v, enableClientKeepalive: %v", enableServerKeepalive, enableClientKeepalive)) | ||
|
||
| return factory, nil | ||
| } | ||
|
|
||
| func FrontendHTTPClientCacheProvider( | ||
|
|
||
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'm guessing you set these externally instead of passing them to NewFactory to avoid having to change all the tests? that's kind of messy but it's okay since it's just temporary.
Uh oh!
There was an error while loading. Please reload this page.
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.
yeah, and when removing, we don't have to deal with signature change again. I will add todo comments for that as well.