diff --git a/Documentation/Changelog.md b/Documentation/Changelog.md index e77c81730..e55a8fa86 100644 --- a/Documentation/Changelog.md +++ b/Documentation/Changelog.md @@ -6,6 +6,7 @@ * Names can no longer contain whitespace. * Servers can now be drained. * The servers of a service can now be defined using a monitor. +* Durations can now be specified as hours, minutes, seconds or milliseconds. For more details, please refer to: diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index d15cd64f4..ca66d573d 100644 --- a/Documentation/Getting-Started/Configuration-Guide.md +++ b/Documentation/Getting-Started/Configuration-Guide.md @@ -219,6 +219,28 @@ max_size=1000000M max_size=1000G max_size=1T ``` + +#### Durations + +A number denoting a duration can be suffixed by one of the case-insensitive +suffixes `h`, `m`, `s` and `ms`, for specifying durations in hours, minutes, +seconds and milliseconds, respectively. + +For instance, the following entries +``` +soft_ttl=1h +soft_ttl=60m +soft_ttl=3600s +soft_ttl=3600000ms +``` +are equivalent. + +Note that if an explicit unit is not specified, then it is specific to the +configuration parameter whether the duration is interpreted as seconds or +milliseconds. + +_Not_ providing an explicit unit has been deprecated in MaxScale 2.4. + #### Regular Expressions When a regular expression (regex) parameter is accepted, the pattern string diff --git a/Documentation/Release-Notes/MaxScale-2.4.0-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.4.0-Release-Notes.md index fcfb3a439..ab30a02b0 100644 --- a/Documentation/Release-Notes/MaxScale-2.4.0-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.4.0-Release-Notes.md @@ -76,6 +76,18 @@ In this case, the servers of the service will be defined by the referred to monitor. Note that the parameters `servers` and `cluster` are mutually exclusive. +### Durations + +In the MaxScale configuration file, durations can now be suffixed with +`h`, `m`, `s` or `ms` to indicate that the duration is specified as +hours, minutes, seconds or milliseconds. + +Please see the +[configuration guide](../Getting-Started/Configuration-Guide.md#durations) +for details. + +_Not_ providing an explicit unit has been deprecated in MaxScale 2.4. + ## Bug fixes [Here is a list of bugs fixed in MaxScale 2.4.0.](https://jira.mariadb.org/issues/?jql=project%20%3D%20MXS%20AND%20issuetype%20%3D%20Bug%20AND%20status%20%3D%20Closed%20AND%20fixVersion%20%3D%202.4.0) diff --git a/Documentation/Upgrading/Upgrading-To-MaxScale-2.4.md b/Documentation/Upgrading/Upgrading-To-MaxScale-2.4.md index 4cb6bcb20..fa6296cf2 100644 --- a/Documentation/Upgrading/Upgrading-To-MaxScale-2.4.md +++ b/Documentation/Upgrading/Upgrading-To-MaxScale-2.4.md @@ -44,3 +44,16 @@ must be changed, for instance, to ... servers=MyServer ``` + +## Durations + +Durations can now be specified using one of the suffixes `h`, `m`, `s` +and `ms` for specifying durations in hours, minutes, seconds and +milliseconds, respectively. + +_Not_ providing an explicit unit has been deprecated in MaxScale 2.4, +so it is adviseable to add suffixes to durations. For instance, +``` +some_param=60s +some_param=60000ms +```