From 3d02343a40cec0b1e91644024301f4b6bbd464e7 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 1 Feb 2017 15:07:53 +0200 Subject: [PATCH 1/9] Update date in release notes --- Documentation/Release-Notes/MaxScale-2.0.4-Release-Notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/Release-Notes/MaxScale-2.0.4-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.0.4-Release-Notes.md index 684836f64..784db5670 100644 --- a/Documentation/Release-Notes/MaxScale-2.0.4-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.0.4-Release-Notes.md @@ -1,4 +1,4 @@ -# MariaDB MaxScale 2.0.4 Release Notes +# MariaDB MaxScale 2.0.4 Release Notes -- 2017-02-01 Release 2.0.4 is a GA release. From eb5e284a90931db590a8406bc45d44ee969c6c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 1 Feb 2017 17:47:28 +0200 Subject: [PATCH 2/9] Rephrase the schemarouter limitations The text was not very clear as to whether the prepared statements were actually supported. --- Documentation/About/Limitations.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Documentation/About/Limitations.md b/Documentation/About/Limitations.md index 3931b391f..860b3d81d 100644 --- a/Documentation/About/Limitations.md +++ b/Documentation/About/Limitations.md @@ -231,9 +231,8 @@ and routed. Here is a list of the current limitations. * The preparation of a prepared statement is routed to all servers. The execution of a prepared statement is routed to the first available server or - to the server pointed by a routing hint attached to the query. As text - protocol prepared statements are relatively rare, prepared statements can't be - considered as supported in schemarouter + to the server pointed by a routing hint attached to the query. In practice + this means that prepared statements aren't supported by the schemarouter. ## Avrorouter limitations (avrorouter) From 6ee257dc5f184b855e3e557a54e818fa174e9aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 3 Feb 2017 08:14:20 +0200 Subject: [PATCH 3/9] Only log an error if the binlog file exists The avrorouter logged an error every time it tried to open a file even if the file doesn't exist. --- server/modules/routing/avro/avro_file.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/modules/routing/avro/avro_file.c b/server/modules/routing/avro/avro_file.c index a16f05665..c1d65b1b0 100644 --- a/server/modules/routing/avro/avro_file.c +++ b/server/modules/routing/avro/avro_file.c @@ -67,7 +67,12 @@ bool avro_open_binlog(const char *binlogdir, const char *file, int *dest) if ((fd = open(path, O_RDONLY)) == -1) { - MXS_ERROR("Failed to open binlog file %s.", path); + if (errno != ENOENT) + { + char err[STRERROR_BUFLEN]; + MXS_ERROR("Failed to open binlog file %s: %d, %s", path, errno, + strerror_r(errno, err, sizeof(err))); + } return false; } From c0f5124f6f1a16d93ec63a127d8222116a294496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 6 Feb 2017 16:35:40 +0200 Subject: [PATCH 4/9] Fix field name parsing in avrorouter The backtick was copied to the field name and converted to an underscore when the name was transformed into a valid Avro identifier. This caused one extra character to appear in the field name in the Avro schema files. --- server/modules/routing/avro/avro_schema.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/server/modules/routing/avro/avro_schema.c b/server/modules/routing/avro/avro_schema.c index dd5c1e9fc..9595e83b7 100644 --- a/server/modules/routing/avro/avro_schema.c +++ b/server/modules/routing/avro/avro_schema.c @@ -481,7 +481,15 @@ static const char *extract_field_name(const char* ptr, char* dest, size_t size) if (ptr > start) { /** Valid identifier */ - snprintf(dest, size, "%.*s", (int)(ptr - start), start); + size_t bytes = ptr - start; + + if (bt) + { + bytes--; + } + + memcpy(dest, start, bytes); + dest[bytes] = '\0'; make_valid_avro_identifier(dest); ptr = next_field_definition(ptr); From e3bed424ea881d4254602561de32b6e431723bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 6 Feb 2017 23:03:57 +0200 Subject: [PATCH 5/9] MXS-1123: Fix connection_timeout causing constant disconnections In a configuration with multiple services, one with connection_timeout and others without it, the connections to non-connection_timeout services would get immediately closed due to integer overflow. --- server/core/session.c | 4 +++- server/include/service.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/server/core/session.c b/server/core/session.c index be290256d..e6b98c975 100644 --- a/server/core/session.c +++ b/server/core/session.c @@ -1025,7 +1025,9 @@ void process_idle_sessions() while (all_session) { if (all_session->ses_is_in_use && - all_session->service && all_session->client_dcb && all_session->client_dcb->state == DCB_STATE_POLLING && + all_session->service && all_session->client_dcb && + all_session->client_dcb->state == DCB_STATE_POLLING && + all_session->service->conn_idle_timeout && hkheartbeat - all_session->client_dcb->last_read > all_session->service->conn_idle_timeout * 10) { dcb_close(all_session->client_dcb); diff --git a/server/include/service.h b/server/include/service.h index 144de3a29..c7e9c22d1 100644 --- a/server/include/service.h +++ b/server/include/service.h @@ -100,7 +100,7 @@ typedef struct server_ref_t #define SERVICE_MAX_RETRY_INTERVAL 3600 /*< The maximum interval between service start retries */ /** Value of service timeout if timeout checks are disabled */ -#define SERVICE_NO_SESSION_TIMEOUT LONG_MAX +#define SERVICE_NO_SESSION_TIMEOUT 0 /** * Parameters that are automatically detected but can also be configured by the @@ -149,7 +149,7 @@ typedef struct service SERVICE_REFRESH_RATE rate_limit; /**< The refresh rate limit for users table */ FILTER_DEF **filters; /**< Ordered list of filters */ int n_filters; /**< Number of filters */ - long conn_idle_timeout; /**< Session timeout in seconds */ + uint64_t conn_idle_timeout; /**< Session timeout in seconds */ char *weightby; struct service *next; /**< The next service in the linked list */ bool retry_start; /*< If starting of the service should be retried later */ From 147ffcce0261b1bc9125b3dec6204239bc4fbbee Mon Sep 17 00:00:00 2001 From: MassimilianoPinto Date: Tue, 7 Feb 2017 12:38:14 +0100 Subject: [PATCH 6/9] MaxScale-2.1.0-Release-Notes update MaxScale-2.1.0-Release-Notes update --- .../MaxScale-2.1.0-Release-Notes.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md index 9d0abaf3a..ce2851ead 100644 --- a/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md @@ -132,6 +132,12 @@ For more details, read the [Galeramon documentation](../Monitors/Galera-Monitor. MaxAdmin now defaults to Emacs editing mode instead of VIM. To activate with VIM-mode start MaxAdmin with option -i. +### Named Server Filter +The source option can now handle wildcards such as: +192.168.%.% + +For more details, read the [Named Server Filter documentation](../Filters/Named-Server-Filter.md). + ## New Features ### Dynamic configuration @@ -274,6 +280,16 @@ to large sets of data with a single query. For more information, refer to the [Maxrows](../Filters/Maxrows.md) documentation. +### Galeramon Monitor new option +The `set_donor_nodes` option allows the setting of _global variable_ _wsrep_sst_donor_ with a list the preferred donor nodes (among slave ones). + +For more details, read the [Galeramon documentation](../Monitors/Galera-Monitor.md). + +### Binlog Server encrypted binlogs +The binlog server can optionally encrypt the events received from the master server: the setup requires MariaDB 10.1 master (with Encryption active) and the `mariadb10-compatibility=1` option set. + +For more details, read the [Binlogrouter documentation](../Routers/Binlogrouter.md). + ## Bug fixes [Here is a list of bugs fixed since the release of MaxScale 2.0.4.](https://jira.mariadb.org/browse/MXS-951?jql=project%20%3D%20MXS%20AND%20issuetype%20%3D%20Bug%20AND%20resolution%20in%20(Fixed%2C%20Done)%20AND%20fixVersion%20%3D%202.1.0%20AND%20fixVersion%20!%3D%202.0.1%20AND%20fixVersion%20!%3D%202.0.2%20AND%20fixVersion%20!%3D%202.0.3%20AND%20fixVersion%20!%3D%202.0.4) From b0cf8c6e38e93690045e2730b2f4d4c2fb86481c Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Tue, 7 Feb 2017 11:17:22 +0200 Subject: [PATCH 7/9] Update ChangeLog --- Documentation/Changelog.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/Changelog.md b/Documentation/Changelog.md index 497a03104..3ea72cc1a 100644 --- a/Documentation/Changelog.md +++ b/Documentation/Changelog.md @@ -2,13 +2,16 @@ ## MariaDB MaxScale 2.1 * Hierarchical configuration files are now supported. -* Logging is now performed in a way compatible with logrotate(8) +* Logging is now performed in a way compatible with logrotate(8). * Persistent connections are reset upon resuse. -* Galera monitor now consistently chooses the same node as master +* Galera monitor now consistently chooses the same node as master. +* Galera Monitor can set the preferred donor nodes list. * The configuration can now be altered dynamically and the changes are persisted. -* There is now a monitor for Amazon Aurora clusters +* There is now a monitor for Amazon Aurora clusters. * MySQL Monitor now has a multi-master mode. * MySQL Monitor now has a failover mode. +* Named Server Filter now supports wildcards for source option. +* Binlog Server can now be configured to encrypt binlog files. * New filters, _cache, _ccrfilter_, _masking_, and _maxrows_ are introduced. For more details, please refer to: From 4f7b2b545eca3fc6fe5ae67857d4225040781f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 8 Feb 2017 08:34:34 +0200 Subject: [PATCH 8/9] Remove documentation for `monitor` parameter The use of monitors in services isn't complete but this was not in the documentation. A more complete solution should be done at a later date and the current documentation should be removed. --- .../Getting-Started/Configuration-Guide.md | 36 ------------------- .../MaxScale-2.1.0-Release-Notes.md | 9 ----- 2 files changed, 45 deletions(-) diff --git a/Documentation/Getting-Started/Configuration-Guide.md b/Documentation/Getting-Started/Configuration-Guide.md index b965f4a1f..6970f9968 100644 --- a/Documentation/Getting-Started/Configuration-Guide.md +++ b/Documentation/Getting-Started/Configuration-Guide.md @@ -589,42 +589,6 @@ filters=counter | QLA The requests pass through the filters from left to right in the order defined in the configuration parameter. -#### `monitor` - -The monitor parameter tells the service which cluster of servers to use. The -value of the option is the name of a monitor object. This removes the redundant -definition of servers in both services and monitors. - -If both the `monitor` and `servers` parameters are defined, only the `monitor` -parameter will be used. - -Only one cluster can be defined for a service. Multi-cluster setups should use -the `servers` parameter to list the servers that the service should use. - -Here is an excerpt from an example configuration with a service that defines the -cluster parameter. - -``` -[db-cluster-1-monitor] -type=monitor -module=mysqlmon -servers=server1,server2,server3 -user=maxuser -passwd=maxpwd -monitor_interval=1000 - -[my-readwrite-service] -type=service -router=readwritesplit -monitor=db-cluster-1-monitor -user=maxuser -passwd=maxpwd -``` - -The _db-cluster-1-monitor_ cluster consists of three servers monitored by a -_mysqlmon_ monitor module. The _my-readwrite-service_ uses this monitor as the -source for servers. - #### `servers` The servers parameter in a service definition provides a comma separated list of diff --git a/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md b/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md index ce2851ead..d45dee83d 100644 --- a/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md +++ b/Documentation/Release-Notes/MaxScale-2.1.0-Release-Notes.md @@ -188,15 +188,6 @@ allowing runtime tuning of parameters. - `destroy monitor`: Destroy a created monitor - `alter monitor`: Alter monitor parameters -### Monitors as server sources for services - -Services now accept a `monitor` parameter which can be used to point a service -to a cluster of servers that are monitored by a monitor. The value of the -`monitor` parameter should be the name of a monitor in the configuration name. - -For more details, refer to the [Configuration -Guide](../Getting-Started/Configuration-Guide.md#cluster) section on clusters. - ### Module commands Introduced in MaxScale 2.1, the module commands are special, module-specific From c82831cc100aee7ba3e3dbe1ea52869e19044243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 8 Feb 2017 09:29:26 +0200 Subject: [PATCH 9/9] Fix merge conflict An old define name caused the build to fail. --- server/modules/routing/avrorouter/avro_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/routing/avrorouter/avro_file.c b/server/modules/routing/avrorouter/avro_file.c index e91bec5b4..4ab4aae93 100644 --- a/server/modules/routing/avrorouter/avro_file.c +++ b/server/modules/routing/avrorouter/avro_file.c @@ -70,7 +70,7 @@ bool avro_open_binlog(const char *binlogdir, const char *file, int *dest) { if (errno != ENOENT) { - char err[STRERROR_BUFLEN]; + char err[MXS_STRERROR_BUFLEN]; MXS_ERROR("Failed to open binlog file %s: %d, %s", path, errno, strerror_r(errno, err, sizeof(err))); }