Skip to content

Conversation

@trevorwhitney
Copy link
Collaborator

@trevorwhitney trevorwhitney commented Oct 7, 2021

What this PR does / why we need it:
This changes two default configuration values:

grpc_server_min_time_between_pings: '10s'
grpc_server_ping_without_stream_allowed: true

Which issue(s) this PR fixes:
Fixes #4434

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated

throwaway := flag.NewFlagSet("throwaway", flag.PanicOnError)

// Register to throwaway flags first. Default values are remembered during registration and cannot be changed,
// but we can take values from throwaway flag set and reregister into supplied flags with new default values.
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: how is it different than just changing default values of those two configs directly in c.Server.RegisterFlags?

It's confusing because, all our default values are in c.Server.RegisterFlags() currently. And IMHO, its bit odd to move only those two into separate function with throwaway flagset :)

I see you tried explaining it in the comment. But I think I failed to understand what that exactly means and why it matters here :( Shouldn't this be treated as normal default values?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kavirajk c.Server.RegisterFlags() is defined in the weaveworks/common library. We could make a PR into that if we think this is a better default for all cases, but I'm not sure if that's the case. I think we need to change this because of something to do specifically with memberlist. They're currently using the grpc defaults which they might prefer to keep. Either way, I still think this makes sense in the meantime to override them here until such a PR is made and merged.

Copy link
Contributor

Choose a reason for hiding this comment

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

I also wish there were a better way.

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM Let's wait for @KMiller-Grafana

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>
Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>
Copy link
Contributor

@KMiller-Grafana KMiller-Grafana left a comment

Choose a reason for hiding this comment

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

Docs look good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change default values for GRPC server settings required by querier to connect to frontend and/or scheduler

4 participants