13661 Commits

Author SHA1 Message Date
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
Markus Mäkelä
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
Markus Mäkelä
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
Esa Korhonen
5edfba6623 Merge branch '2.3' into develop 2019-06-14 11:15:17 +03:00
Esa Korhonen
cf866a6a57 Merge branch '2.2' into 2.3 2019-06-14 10:49:51 +03:00
Johan Wikman
2e9e22893a Fix typo in Clustrix tutorial 2019-06-14 10:14:48 +03:00
Markus Mäkelä
c819271cab
Merge branch '2.3' into develop 2019-06-14 09:40:19 +03:00
Markus Mäkelä
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
Esa Korhonen
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
Markus Mäkelä
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
Johan Wikman
f5c239cc8d Reorganize Clustrix tutorial slightly 2019-06-13 14:52:51 +03:00
Esa Korhonen
0f3ec4f42e Remove "allow_cluster_recovery" from test configs
The parameter has been removed.
2019-06-13 14:35:50 +03:00
Esa Korhonen
648eda9262 Remove deprecated parameters from MariaDBMon
Also deprecates an unused parameter.
2019-06-13 14:35:50 +03:00
Johan Wikman
f478386e47 MXS-2518 Document Clustrix and slave_selection_criteria 2019-06-13 13:45:14 +03:00
Johan Wikman
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
Johan Wikman
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
Esa Korhonen
6ee9736803 Clean up scheduled event handling
Removes some duplicated code.
2019-06-13 13:19:48 +03:00
Johan Wikman
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
Esa Korhonen
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
Marko
c418bf81e1 MXS-2493 Add maxctrl show dbusers <service> 2019-06-12 23:49:08 +03:00
Markus Mäkelä
10272ce633
Merge branch '2.3' into develop 2019-06-12 18:15:37 +03:00
Markus Mäkelä
239c4a8615
MXS-2549: Install prelink config file
The prelink configuration file should prevent maxctrl from being corrupted
by it.
2019-06-12 17:49:41 +03:00
Markus Mäkelä
cd1b2e8748
Log server version when it changes
Knowing what the server version is can help rule out some
problems. Logging it whenever it changes also helps figure out when
upgrades took place.
2019-06-12 17:26:58 +03:00
Johan Wikman
9c1c8053b9 Merge branch '2.3' into develop 2019-06-12 14:33:07 +03:00
Johan Wikman
74ef8a9591 Update 2.3 maintenance version 2019-06-12 14:28:37 +03:00
Johan Wikman
493155127b Merge branch '2.3.8' into 2.3 2019-06-12 14:27:22 +03:00
Johan Wikman
208377b262 Update 2.3.8 release date 2019-06-12 14:26:15 +03:00
Markus Mäkelä
1f46f1bfca
Merge branch '2.3' into develop 2019-06-12 12:24:07 +03:00
Markus Mäkelä
bb92d61a1b
Fix KILL command packet boundary detection
If a packet with a KILL query was followed with another packet in the same
network buffer, the code wouldn't work as it expected to receive only one
packet at a time.
2019-06-12 12:20:26 +03:00
Markus Mäkelä
7470a58a32
Fix release mode build failures
Fixed mxb_assert_message and one dcb_printf failure.
2019-06-12 12:15:47 +03:00
Johan Wikman
a0fcf67993 Merge branch '2.3' into develop 2019-06-12 11:29:03 +03:00