yaml: use float64 for durations#6250
Merged
sougou merged 3 commits intovitessio:masterfrom Jun 2, 2020
Merged
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>
deepthi
reviewed
Jun 2, 2020
| 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.") |
Collaborator
There was a problem hiding this comment.
How are the params grouped? I would have expected a grouping either by type (BoolVar/IntVar/Float64Var) or by "config group" (Oltp/OltpReadPool) etc..
deepthi
reviewed
Jun 2, 2020
| 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.") |
Collaborator
There was a problem hiding this comment.
Looks like this adds a new command line param to expose an existing yaml config param?
Member
|
yes! this will be great for us at etsy. |
deepthi
added a commit
that referenced
this pull request
Jun 16, 2020
backport #6250 to 6.0 release branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
HeartbeatIntervalMillisecondsto 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.