13691 Commits

Author SHA1 Message Date
Markus Mäkelä
aa75c75fdb
Add readwritesplit info to 2.4 upgrading document
Added relevant changes that need to be taken into account when upgrading
to 2.4 from an older version.
2019-06-24 12:27:06 +03:00
Markus Mäkelä
736a59dde8
Add unique config for kill_query
This way the info log is always on.
2019-06-24 12:27:06 +03:00
Markus Mäkelä
75147f58fb
Make queries unique in bug547
By having unique queries, we know which connection failed.
2019-06-24 12:27:06 +03:00
Esa Korhonen
24b575bb93 Print error if child process cannot access monitor script file 2019-06-24 12:22:25 +03:00
Johan Wikman
824a80e084 Update dbfwfilter and masking documentation 2019-06-24 10:37:15 +03:00
Johan Wikman
9f771ffc2b Revert "MXS-2513 Deprecate firewall and masking filters"
This reverts commit de3c5721e95d5d5be909a56faeb121ad09a2f6fe.
2019-06-24 10:21:01 +03:00
Markus Mäkelä
278c26cd54
Fix build failure
mxs::rtrim was renamed to mxb::rtrim.
2019-06-20 23:17:41 +03:00
Markus Mäkelä
0b67ce1e82
Merge branch '2.3' into develop 2019-06-20 14:36:48 +03:00
Markus Mäkelä
be429c2c57
MXS-2490: Always restore original statement ID
By always restoring the ID, we are guaranteed to only store the query in
the form that it was originally sent in. This should be changed so that
the ID that the client sends can be used as-is in the backends.
2019-06-20 14:27:04 +03:00
Markus Mäkelä
805be70a78
Add more information to rwsplit info messages
The statement ID for all binary protocol statements and the error given to
handleError are now logged.
2019-06-20 14:27:03 +03:00
Markus Mäkelä
20f595d978
Merge branch '2.3' into develop 2019-06-20 13:00:13 +03:00
Markus Mäkelä
301b1b63ab
MXS-2569: Always terminate schemas with newlines
If the stored file didn't have a newline in the schema, the schema and the
first row would be on the same line.
2019-06-20 12:32:30 +03:00
Markus Mäkelä
7673ee685d
Distinguish stopped and finished workers
By having a separate FINISHED state and a STOPPED state, it is possible to
know at which point in the worker's lifetime an event is done. Posting of
messages before a worker is started is allowed but posting them after the
worker has stopped is not.

This fixes avrorouter related failures and all other failures that stem
from worker messages being ignored at startup.
2019-06-20 12:32:30 +03:00
Markus Mäkelä
dd944c7302
MXS-2568: Always enable LOCAL INFILE for testing
The automatic detection of LOCAL INFILE added in connector-c 3.0.9
requires that the option is enabled explicitly.
2019-06-20 12:32:30 +03:00
Johan Wikman
1fbb57f9b2 Check if socket server is MaxScale service
We need to handle the case that a MaxScale service is used as a
server over Unix domain sockets.
2019-06-20 11:05:00 +03:00
Markus Mäkelä
03a7850de4
Fix mxb::to_binary_size
The function now handles negative and zero values.
2019-06-20 09:49:19 +03:00
Esa Korhonen
6a83abe5cf Mention MariaDB-Monitor removed parameters in documentation 2019-06-19 17:35:19 +03:00
Esa Korhonen
4a3539cd60 Remove deprecated parameter from test configuration 2019-06-19 17:35:19 +03:00
Esa Korhonen
197d577aa1 Set correct replication lag state
The lag state was inverted.
2019-06-19 17:35:19 +03:00
Esa Korhonen
5528a8e8fb Merge branch '2.3' into develop 2019-06-19 17:27:57 +03:00
Esa Korhonen
39df829384 Don't kick out super-users when performing rejoin
When rejoining a server, preventing writes is not as essential as in switchover.
2019-06-19 17:14:39 +03:00
Markus Mäkelä
0ff065c4eb
Use double quotes with check_maxctrl
The command doesn't seem to like single quotes and wildcards.
2019-06-19 16:12:28 +03:00
Markus Mäkelä
2bd614ce8e
MXS-2566: Use connection counts more often
The connection counts are now always used to pick the best servers where
the initial connections are created. This covers both master and slaves
selection. Reconnections done while routing queries still pick the "best"
server according to the slave selection criteria. This allows better
servers to be taken into use when `lazy_connect` is enabled.
2019-06-19 16:12:28 +03:00
Niclas Antti
ef3136c5c9 MXS-2555 Fix split packet bug in smart session.
The test failed to notice that the split request session was left in a
bad state after the split query had (succesfully) finished.
2019-06-19 15:31:34 +03:00
Niclas Antti
6ba1c277be MXS-2555 Fix a few TODOs and other cleanup 2019-06-19 15:31:34 +03:00
Niclas Antti
a950715176 MXS-2555 Implement cache eviction (or query re-measurment) strategy 2019-06-19 15:31:34 +03:00
Niclas Antti
f5615cc174 MXS-2555 Add support for unix sockets to LocalClient 2019-06-19 15:31:34 +03:00
Niclas Antti
f7d44835a7 MXS-2555 Use mxs_mysql_execute_kill_all_others in smartrouter 2019-06-19 15:31:34 +03:00
Niclas Antti
2343326ecc MXS-2555 Add execute_kill version, that kills all but a given mysql_thread_id
NOTE: This does not work whit unix scokets. The reason is that LocalClient
assumes network sockets. TODO: to add unix socket support.
2019-06-19 15:31:34 +03:00
Niclas Antti
56e5c417c1 MXS-2555 uncrustify mysql_common.cc, and a minor bug fix in smartrouter.cc 2019-06-19 15:31:34 +03:00
Niclas Antti
6a7b6d4b89 MXS-2555 Beta Smart Router.
1. Remove persistence of performance data
2. Move global CanonicalPerformance into SmartRouter object
3. Implement another kill_all_others_v2. Left kill_all_others_v1
    in case it should be fixed and used instead.
2019-06-19 15:31:34 +03:00
Niclas Antti
1241300494 MXS-2555 Simple Smart Router
Does the measurments, usage of the same  and persistence to file.
Kill is not implemented, so waits for all clusters to fully responds

The performance data uses a mutex and the persistence data file
is written while holding the mutex. This obviously needs to be
improved, but this commit shows the working concept.
2019-06-19 15:31:34 +03:00
Johan Wikman
c47a2d32fa Fix mxs1980_blr_galera_server_ids
A housekeeping task cannot be removed by name from within the
task function itself. Instead the function must simply return
false.
2019-06-19 15:27:09 +03:00
Markus Mäkelä
aeebf941f6
Merge branch '2.3' into develop 2019-06-19 13:28:58 +03:00
Markus Mäkelä
52b7c23998
Use correct parameter set for listeners
The listener JSON used server parameters.
2019-06-19 12:44:45 +03:00
Markus Mäkelä
3d8475f8ed
Merge branch '2.2' into 2.3 2019-06-19 12:37:23 +03:00
Markus Mäkelä
35b5f2099b
Regenerate MaxCtrl documentation 2019-06-19 10:44:16 +03:00
Markus Mäkelä
96d5c575f8
Document required create service parameters
When a service is created via MaxCtrl, the `user` and `password`
parameters must be defined. This was not documented in the command help
output.
2019-06-19 10:44:16 +03:00
Markus Mäkelä
27fb397041
MXS-2547: Do shutdown on main worker
By stopping the REST API before the workers and moving the shutdown to the
same worker that handles REST API requests, we prevent the hang on
shutdown. This also makes the signal handler signal-safe.
2019-06-19 10:31:47 +03:00
Markus Mäkelä
69b3879357
MXS-2547: Don't post messages to stopped workers
If a worker has been stopped, tasks must not be executed on it. To prevent
this, the calling code should check whether the worker has been
stopped. This does not prevent the case where a message is successfully
posted to a worker but the worker is stopped before it processes it.
2019-06-19 10:31:47 +03:00
Markus Mäkelä
b7294a28af
MXS-2547: Assert that workers aren't stopped
If a worker is stopped, none of the Worker::execute or post_message
methods should be called.
2019-06-19 10:31:47 +03:00
Johan Wikman
c5eb97aff0 Remove white-space in names in config file 2019-06-18 17:10:19 +03:00
Markus Mäkelä
64d25a48bd
Merge commit 'a60bd376108f71fccf40001c1496f32c11137fe4' into develop 2019-06-18 15:51:17 +03:00
Esa Korhonen
a60bd37610 MXS-2367 Print slave connection errors when replication fails
The slave connection I/O-tread stays running if replication credentials are
wrong when connecting to master. This causes a switchover/failover timeout.
When this happens, print the error in the slave connection status as this
clarifies the problem to the user.
2019-06-18 15:02:21 +03:00
Markus Mäkelä
6cbe9d1258
MXS-2550: Fix default module parameters
The parameters weren't processed when they were added from the module
defaults.
2019-06-18 07:06:51 +03:00
Markus Mäkelä
ca532ec769
MXS-2565: Fix list servers with sockets
The address and socket parameters need special handling.
2019-06-17 20:50:46 +03:00
Markus Mäkelä
372c9a8350
Fix configuration guide documentation
Fixed limitations section, the heading depths and the document name,
corrected localhost_match_wildcard_host, added deprecation notes where
required.
2019-06-17 14:07:52 +03:00
Markus Mäkelä
002281599e
MXS-2563: Add test case
Added a test case that reproduces the debug assertion with the old code
and verifies that it is fixed with the new one.
2019-06-17 14:07:52 +03:00
Markus Mäkelä
f6a5b59067
MXS-2563: Fix query retrying on slave failure
If one slave is executing a query while another one is executing a session
command and the one that is executing the session command fails, the
ongoing query would get retried even though the server that failed was not
executing it. If the server was executing a session command, nothing needs
to be done.
2019-06-17 14:07:52 +03:00
Markus Mäkelä
f8729c272e
Erase trailing unexpected ERR packets
If a resultset is followed by an ERR packet that is not expected
(e.g. server is shutting down), the packet must not be sent to the
client. This allows readwritesplit to replace the failing connection with
a new one thus hiding server shutdowns from clients.
2019-06-14 15:18:02 +03:00