Commit Graph

13773 Commits

Author SHA1 Message Date
197d577aa1 Set correct replication lag state
The lag state was inverted.
2019-06-19 17:35:19 +03:00
5528a8e8fb Merge branch '2.3' into develop 2019-06-19 17:27:57 +03:00
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
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
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
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
6ba1c277be MXS-2555 Fix a few TODOs and other cleanup 2019-06-19 15:31:34 +03:00
a950715176 MXS-2555 Implement cache eviction (or query re-measurment) strategy 2019-06-19 15:31:34 +03:00
f5615cc174 MXS-2555 Add support for unix sockets to LocalClient 2019-06-19 15:31:34 +03:00
f7d44835a7 MXS-2555 Use mxs_mysql_execute_kill_all_others in smartrouter 2019-06-19 15:31:34 +03:00
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
56e5c417c1 MXS-2555 uncrustify mysql_common.cc, and a minor bug fix in smartrouter.cc 2019-06-19 15:31:34 +03:00
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
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
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
aeebf941f6 Merge branch '2.3' into develop 2019-06-19 13:28:58 +03:00
52b7c23998 Use correct parameter set for listeners
The listener JSON used server parameters.
2019-06-19 12:44:45 +03:00
3d8475f8ed Merge branch '2.2' into 2.3 2019-06-19 12:37:23 +03:00
35b5f2099b Regenerate MaxCtrl documentation 2019-06-19 10:44:16 +03:00
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
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
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
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
c5eb97aff0 Remove white-space in names in config file 2019-06-18 17:10:19 +03:00
64d25a48bd Merge commit 'a60bd376108f71fccf40001c1496f32c11137fe4' into develop 2019-06-18 15:51:17 +03:00
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
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
ca532ec769 MXS-2565: Fix list servers with sockets
The address and socket parameters need special handling.
2019-06-17 20:50:46 +03:00
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
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
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
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
fc997b9e38 Add mxs::Buffer::erase
Added range-erase method to mxs::Buffer. This makes it easier to modify
the contents of mxs::Buffer.

The intended use-case for now is to erase unexpected trailing ERR packets
from resultsets.
2019-06-14 15:18:02 +03:00
7dde0edb54 Clean up unexpected error handling in readwritesplit
By using the Error class, the code can be cleaned up and simplified.
2019-06-14 15:18:01 +03:00
5edfba6623 Merge branch '2.3' into develop 2019-06-14 11:15:17 +03:00
cf866a6a57 Merge branch '2.2' into 2.3 2019-06-14 10:49:51 +03:00
2e9e22893a Fix typo in Clustrix tutorial 2019-06-14 10:14:48 +03:00
c819271cab Merge branch '2.3' into develop 2019-06-14 09:40:19 +03:00
2accfad329 Handle trailing unexpected ERR packets
RWBackend did not expect that a resultset and an unexpected ERR packet
could be stored in the same buffer. This can happen for example if a
server shuts down immediately after the resultset is sent.
2019-06-14 08:12:02 +03:00
acfaae9d46 MXS-2480 Use in-memory-database in PAM authenticator
This was already fixed in develop, but the fix is both small and useful
so should be backported.
2019-06-13 17:47:08 +03:00
8311dba654 Send the OK outside the KILL functions
By sending the OK for the KILL commands outside the function, they can be
used to kill connections that do not expect responses.
2019-06-13 16:44:26 +03:00
f5c239cc8d Reorganize Clustrix tutorial slightly 2019-06-13 14:52:51 +03:00
0f3ec4f42e Remove "allow_cluster_recovery" from test configs
The parameter has been removed.
2019-06-13 14:35:50 +03:00
648eda9262 Remove deprecated parameters from MariaDBMon
Also deprecates an unused parameter.
2019-06-13 14:35:50 +03:00
f478386e47 MXS-2518 Document Clustrix and slave_selection_criteria 2019-06-13 13:45:14 +03:00
0b10b27ffd MXS-2518 Check connection distribution with Clustrix
Readconnroute, with default 'router_options', as well as readwritesplit
 should cause the connections to be distributed evenly across all nodes.
2019-06-13 13:45:14 +03:00
62daabe682 MXS-2518 Document Clustrix and router_options
With Clustrix, in whose case all nodes will be masters, using
'router_options=master' with readconnroute will cause only one
node to be used.
2019-06-13 13:45:14 +03:00
6ee9736803 Clean up scheduled event handling
Removes some duplicated code.
2019-06-13 13:19:48 +03:00
d03e025046 MXS-2553 Allow parenthesis around SELECT
With this change, a parenthesized top-level SELECT, such as
"(SELECT f FROM t)" will be fully parsed. Before this change,
the statement was classified as invalid and would thus have
been sent to the master.

With this change also statements like

    (SELECT f FROM t1) UNION (SELECT f FROM t2)

will be correctly classified, although only partially parsed.
2019-06-13 10:42:46 +03:00
a5898f83f9 Fix mysqlmon_rejoin_manual
Added some extra connection refreshing and monitor waiting. Unclear why this
is needed now but it seems to work.
2019-06-13 10:28:14 +03:00