-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
yaml: use float64 for durations #6250
Conversation
There are some use cases where users needed to specify a sub-second duration. I tried changing the units of all the variables to Ms but that made everything else worse because some of the numbers were becoming non human readable. Instead, we'll use float64 values that also support whole numbers up to 53 bits. Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Now that we allow fractional seconds, let's use this as a standardized unit. Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
This flag didn't previously exist, but there are users that want to fine tune this setting. Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
flag.IntVar(¤tConfig.OltpReadPool.IdleTimeoutSeconds, "queryserver-config-idle-timeout", defaultConfig.OltpReadPool.IdleTimeoutSeconds, "query server idle timeout (in seconds), vttablet manages various mysql connection pools. This config means if a connection has not been used in given idle timeout, this connection will be removed from pool. This effectively manages number of connection objects and optimize the pool performance.") | ||
flag.Float64Var(¤tConfig.SchemaReloadIntervalSeconds, "queryserver-config-schema-reload-time", defaultConfig.SchemaReloadIntervalSeconds, "query server schema reload time, how often vttablet reloads schemas from underlying MySQL instance in seconds. vttablet keeps table schemas in its own memory and periodically refreshes it from MySQL. This config controls the reload time.") | ||
flag.Float64Var(¤tConfig.Oltp.QueryTimeoutSeconds, "queryserver-config-query-timeout", defaultConfig.Oltp.QueryTimeoutSeconds, "query server query timeout (in seconds), this is the query timeout in vttablet side. If a query takes more than this timeout, it will be killed.") | ||
flag.Float64Var(¤tConfig.OltpReadPool.TimeoutSeconds, "queryserver-config-query-pool-timeout", defaultConfig.OltpReadPool.TimeoutSeconds, "query server query pool timeout (in seconds), it is how long vttablet waits for a connection from the query pool. If set to 0 (default) then the overall query timeout is used instead.") |
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.
How are the params grouped? I would have expected a grouping either by type (BoolVar/IntVar/Float64Var) or by "config group" (Oltp/OltpReadPool) etc..
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.
LGTM
flag.Float64Var(¤tConfig.SchemaReloadIntervalSeconds, "queryserver-config-schema-reload-time", defaultConfig.SchemaReloadIntervalSeconds, "query server schema reload time, how often vttablet reloads schemas from underlying MySQL instance in seconds. vttablet keeps table schemas in its own memory and periodically refreshes it from MySQL. This config controls the reload time.") | ||
flag.Float64Var(¤tConfig.Oltp.QueryTimeoutSeconds, "queryserver-config-query-timeout", defaultConfig.Oltp.QueryTimeoutSeconds, "query server query timeout (in seconds), this is the query timeout in vttablet side. If a query takes more than this timeout, it will be killed.") | ||
flag.Float64Var(¤tConfig.OltpReadPool.TimeoutSeconds, "queryserver-config-query-pool-timeout", defaultConfig.OltpReadPool.TimeoutSeconds, "query server query pool timeout (in seconds), it is how long vttablet waits for a connection from the query pool. If set to 0 (default) then the overall query timeout is used instead.") | ||
flag.Float64Var(¤tConfig.OlapReadPool.TimeoutSeconds, "queryserver-config-stream-pool-timeout", defaultConfig.OlapReadPool.TimeoutSeconds, "query server stream pool timeout (in seconds), it is how long vttablet waits for a connection from the stream pool. If set to 0 (default) then there is no timeout.") |
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.
Looks like this adds a new command line param to expose an existing yaml config param?
yes! this will be great for us at etsy. |
backport #6250 to 6.0 release branch
There are some use cases where users needed to specify a sub-second
duration. I tried changing the units of all the variables to Ms
but that made everything else worse because some of the numbers
were becoming non human readable.
Instead, we'll use float64 values that also support whole numbers
up to 53 bits.
To further standardize, I've changed
HeartbeatIntervalMilliseconds
to Seconds.
Finally, added support for a new flag that allows setting of timeouts
for olap pools. Some users want this option in the command line until
they migrate to using yamls.