From 376cd3aa9e8e9b418420ce2009f35168bfd8c9df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Sat, 4 Aug 2018 04:47:41 +0300 Subject: [PATCH] Enable query_retries by default Enabling it with a value of 1 should remove the vast majority of connection related problems that appear in MaxScale. This should filter out most of the errors caused by transient network problems. --- Documentation/Getting-Started/Configuration-Guide.md | 5 +++-- .../Release-Notes/MaxScale-2.3.0-Release-Notes.md | 7 +++++++ server/core/internal/config.hh | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index e0fc4cb97..a91161286 100644 --- a/Documentation/Getting-Started/Configuration-Guide.md +++ b/Documentation/Getting-Started/Configuration-Guide.md @@ -209,8 +209,9 @@ auth_write_timeout=10 #### `query_retries` -The number of times an interrupted internal query will be retried. This feature -was added in MaxScale 2.1.10 and is disabled by default. +The number of times an interrupted internal query will be retried. The default +is to retry the query once. This feature was added in MaxScale 2.1.10 and was +disabled by default until MaxScale 2.3.0. An interrupted query is any query that is interrupted by a network error. Connection timeouts are included in network errors and thus is it diff --git a/Documentation/Release-Notes/MaxScale-2.3.0-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.3.0-Release-Notes.md index 11c29e26e..1946de8c9 100644 --- a/Documentation/Release-Notes/MaxScale-2.3.0-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.3.0-Release-Notes.md @@ -10,6 +10,13 @@ report at [Jira](https://jira.mariadb.org). ## Changed Features +### `query_retries` + +The default value of `query_retries` was changed from 0 to 1. This turns +on failure tolerant queries for monitors and authenticators which prevents +failures due to network problems. A single reconnection attempt is made to +keep responsiveness high even with default values. + ### Session Command History The _readwritesplit_ session command history is now enabled mby default but it diff --git a/server/core/internal/config.hh b/server/core/internal/config.hh index 6edb61365..271967e64 100644 --- a/server/core/internal/config.hh +++ b/server/core/internal/config.hh @@ -24,7 +24,7 @@ #define DEFAULT_NBPOLLS 3 /**< Default number of non block polls before we block */ #define DEFAULT_POLLSLEEP 1000 /**< Default poll wait time (milliseconds) */ #define DEFAULT_NTHREADS 1 /**< Default number of polling threads */ -#define DEFAULT_QUERY_RETRIES 0 /**< Number of retries for interrupted queries */ +#define DEFAULT_QUERY_RETRIES 1 /**< Number of retries for interrupted queries */ #define DEFAULT_QUERY_RETRY_TIMEOUT 5 /**< Timeout for query retries */ #define MIN_WRITEQ_HIGH_WATER 4096 /**< Min high water mark of dcb write queue */ #define MIN_WRITEQ_LOW_WATER 512 /**< Min low water mark of dcb write queue */