Commit Graph

12228 Commits

Author SHA1 Message Date
cf66cc6968 Merge branch '2.2' into 2.3 2018-11-28 11:27:44 +02:00
590e489be0 Merge branch '2.2.17' into 2.2 2018-11-28 11:23:47 +02:00
b3a425c048 Update 2.2.17 release date 2018-11-28 11:07:06 +02:00
c92e485b3b Update table of contents in configuration guide
The file should be broken into smaller pieces.
2018-11-28 10:13:59 +02:00
6451b1f21a MXS-2183: Fix memory leaks
Under heavy load some of the basic network operations could fail which led
to some of the allocated memory to leak.

Also the backend protocol never freed the current protocol command if it
was not completed. This would happen if a user executed a session command
as the first command but backend authentication would fail.
2018-11-28 02:03:00 +02:00
24d1876ed4 Initialize memory in password hashing
The authentication code did not initialize one of the buffers used to
calculate the password hashes. This resulted in the use of uninitialized
memory when the user provided no password.
2018-11-28 00:15:57 +02:00
73aaa3c981 Use failcount=1 in keepalived_masterdown
This speeds up the test and most possibly fixes it.
2018-11-27 12:52:45 +02:00
64ca8d4aaa Simplify mxs1743_rconn_bitmask
The test now uses maxctrl to count how many connections there are. This
helps avoid creating new users on the database and works around the slave
syncing problems.
2018-11-27 12:52:45 +02:00
da83551493 MXS-2189: Prevent unwanted trx replay
When a transaction is being executed on a slave and the master fails, the
transaction replay would start.
2018-11-27 12:52:45 +02:00
c372bd8985 Install dependencies in a temporary directory
Doing the dependency installation in a temporary directory prevents the
pollution of the current working directory.
2018-11-27 12:52:45 +02:00
a15aab610a MXS-2187: Add test case
The test checks that a single transaction can survive multiple master
failovers.
2018-11-27 12:52:45 +02:00
05c9aea04d MXS-2186: Make SHOW DATABASES a read
Since SHOW TABLES is a read, SHOW DATABASES should be one as well.
2018-11-27 12:52:44 +02:00
1abcbd64bd MXS-2187: Allow multiple transaction retries
By resetting the replay state the transaction replay can start again on a
new server. This allows the replay process work when a master server is
shutting down.
2018-11-27 12:52:44 +02:00
e6325d39fb Delay initial transaction replay
By delaying the replay for a second, we give the monitor a small chance to
adap to master failures. It'll also prevent rapid re-querying if multiple
transaction replays are supported.
2018-11-27 12:52:44 +02:00
851793cb86 Fix transaction replay debug assertion
A transaction that just completed will go through the start_trx_replay
function as from the client protocol's point of view the transaction is
still open. The debug assertion did not take this into account and would
fail if a successful commit was the last thing done on master that failed.

Also fixed the formatting.
2018-11-27 12:52:44 +02:00
81937c635b Fix current command tracking during LDLI
When a LOAD DATA LOCAL INFILE was executed, the client and backend
protocols would update the command byte leading to misinterpretations of
the data.
2018-11-27 12:52:44 +02:00
636fdca4aa Update expected outcome of error_messages
The test is expected to fail until MXS-2174 is fixed.
2018-11-27 12:52:43 +02:00
f87ff431c1 Merge branch '2.2' into 2.3 2018-11-27 11:46:47 +02:00
631711f2bf Update maintenance version number 2018-11-27 10:48:18 +02:00
4efb2672ff Update 2.2 change log and 2.2.17 release notes 2018-11-27 10:39:14 +02:00
0c77514aaf Update release notes
Explains the default setting of assume_unique_hostnames.
2018-11-27 10:23:36 +02:00
f41caae5c7 MXS-2175: Fix available_when_donor
If a Galera cluster drops down to a single node, the last node would not
be considered valid. During the failure of the second to last node, the
master would also temporarily lose the master status.

The behavior was changed to always keep the cluster UUID until the cluster
size drops down to zero. This guarantees that the same cluster is used as
long as possible.
2018-11-27 09:22:39 +02:00
19ad915685 Add failover and read_only test
The test performs a series of node stops and starts and checks that server
states are correct and read_only is set on slaves.
2018-11-26 12:13:59 +02:00
1df42326d5 Clean up TopFilter documentation
Wrap lines, clean up headings and add table of contents.
2018-11-26 10:32:08 +02:00
ab7daa9327 Add table of contents to filter documentation
Only added the TOC to the longest files.
2018-11-26 10:32:08 +02:00
ff22624d3c Add table of contents to router documentation
The TOC was added only to the long documentation files to make them easier
to navigate. Also modified the headings for Avro and Binlog routers and did
some minor cleanup.
2018-11-26 10:32:08 +02:00
e287e29ad0 Fix mxs1476 config
The parameter name was wrong.
2018-11-26 09:43:10 +02:00
cf6c48b015 Fix -Wshadow warnings
The cdc_connector.h won't built with -Wshadow if the variable and method
names match.
2018-11-26 09:42:12 +02:00
a042ad646b MXS-2184: Fix avrorouter GTID generation
The event number in the GTID was not incremented for the update_after part
of the transaction.
2018-11-26 09:42:12 +02:00
842f9f1d15 Fix transaction replay timeout
The timeout would not be triggered due to the fact that the
delayed_retry_timeout wasn't inspected.
2018-11-26 09:42:12 +02:00
7bf5c07835 Ignore errors sent by servers in shutdown
When a server is stopping, it'll send an error to the client before
terminating the TCP connection. The code in readwritesplit would detect
this error and create a hangup event on the DCB. This would cause it to
appear as if the TCP connection was broken and the router would
immediately try to reconnect to the same server.

By ignoring the error and allowing the connection to die on its own, we
avoid immediately reconnecting and retrying any transactions on the
stopping server. This increases the chances that the monitor will see it
first and assign the server states correctly before the transaction replay
is attempted.
2018-11-26 09:42:12 +02:00
9f6700b329 Skip connection_keepalive during transaction_replay
When a transaction is replayed, there is no target but the routing was
"successful".
2018-11-26 09:42:11 +02:00
925670ae2f Fix false master failure log message
The message would be logged even if the session continues.
2018-11-26 09:42:11 +02:00
8b92c63248 Remove incorrect assertion
The assertion would hold true for a single worker but it can't be
guaranteed to be true on a multi-worker system where the statistics are
distributed across the workers.
2018-11-26 09:42:11 +02:00
dcf53da209 Enable connection_keepalive by default
Enabling the feature by default prevents the master connection from dying
during times when there are very little or no writes. Having a modest ping
interval of 300 seconds serves to minimize the amount of extra work that
both MaxScale and the server have to do while still keeping the
connections in good shape.
2018-11-26 09:42:11 +02:00
b47d4a4105 Use max_statement_time
Used only with supporting server versions. Using the time limit ensures that
the server interrupts the query at the same point Connector-C would cut the
connection. This prevents lingering queries.

Also, cleans up some associated error messages.
2018-11-23 15:15:44 +02:00
0a5a3309e0 Add missing quotes when printing server names
Some of the log messages didn't have the quotes.
2018-11-23 14:02:09 +02:00
75fb728ee7 Don't require libsystemd for system tests
The tests don't require it to compile.
2018-11-23 08:47:04 +02:00
1bba689c80 Make the error message a const char* const
This prevents linker errors if the source files are used directly.
2018-11-22 14:51:03 +02:00
ba5017bdff Merge branch '2.2' into 2.3 2018-11-22 13:55:17 +02:00
de49797014 Rewrite bug561.sh in C++
Rewrote the bug561.sh test as the error_messages test that covers what was
tested by the script as well as some new parts that were untested. This
revealed a bug in the error messages where MaxScale always returns the
database name in the error.
2018-11-22 13:51:08 +02:00
aa2572c677 Pass database as a parameter in connect
When connecting to a node, a database can now be optionally given as a
parameter. This makes testing with different databases easier as the need
to use the explicit functions is removed.
2018-11-22 13:51:08 +02:00
cb67d4cee3 Log instructions for bypassing test dependency checks
If not all test programs are installed, instructions on how to bypass them
are logged. This allows testing without installing all of the packages.
2018-11-22 13:51:08 +02:00
2ff95216a9 MXS-2081: Prevent unwanted stripping of binaries
RPM packages by default strip all executables on some systems after
installation. To work around this, the post install part needs to be
prevented. This does not mean the post-install scripts used to create the
directories required by MaxScale.
2018-11-22 13:38:35 +02:00
816e45ccb9 Add multimaster test with 'assume_unique_hostnames' disabled
Uses the same test code, just changes the config file. This test is currently
the only one in which the setting is disabled.
2018-11-22 12:17:45 +02:00
fb52e565fe Store capabilities of monitored server
Checking the version number in various places in the code gets confusing.
It's better to check the version in one place and record the relevant data.
2018-11-21 17:36:52 +02:00
01628dd0de Cleanup server version updating 2018-11-21 17:36:52 +02:00
0916b58c7e Merge branch '2.2' into 2.3 2018-11-21 16:46:06 +02:00
dd27fe0c04 Enable the watchdog
As the watchdog related problems have now been dealt with, it is
safe to have it enabled by default.
2018-11-21 15:33:14 +02:00
7777732f19 remove tabs and spaces from set_env.sh 2018-11-21 13:53:50 +02:00