12884 Commits

Author SHA1 Message Date
Markus Mäkelä
995c890664
Fix uninitialized pointers in readwritesplit 2019-03-15 15:41:39 +02:00
Esa Korhonen
14b4fa632a MXS-2271 Move Monitor inside maxscale-namespace
Rearranged monitor.cc by namespace.
2019-03-15 12:57:35 +02:00
Esa Korhonen
5e3f837b42 MXS-2271 Continue monitor header cleanup
No more free functions. Local functions moved to anonymous namespace.
2019-03-15 12:57:35 +02:00
Markus Mäkelä
667a9f1c6f
Merge branch '2.3' into develop 2019-03-15 12:31:08 +02:00
Markus Mäkelä
14890cb232
Merge branch '2.2' into 2.3 2019-03-15 12:26:59 +02:00
Markus Mäkelä
4697128b3c
Update 2.2 maintenance version 2019-03-15 11:42:41 +02:00
Markus Mäkelä
4400876b46
Update release date 2019-03-15 11:41:13 +02:00
Markus Mäkelä
29b8d12be3
Always ignore EPIPE errors
There's no reason to not ignore EPIPE errors in debug builds.
2019-03-14 20:08:13 +02:00
Markus Mäkelä
f9853431ee
Simplify maxrows test config
The configuration now uses only one server to prevent replication lag from
affecting the results.
2019-03-14 12:22:25 +02:00
Markus Mäkelä
09dc92973e
Discard connections as the last step
Th discarding of connections in maintenance mode must be done after any
results have been written to them. This prevents closing of the connection
before the actual result is returned.
2019-03-14 12:15:30 +02:00
Markus Mäkelä
e5edb5c78f
Fix reads into bad memory in readwritesplit
The candidate selection code used default values that would cause reads
past buffers. The code could also dereference the end iterator which
causes undefined behavior.
2019-03-14 12:15:30 +02:00
Markus Mäkelä
b537176248
Fix parsing of non-query packets
Packets that do not contain SQL should not be parsed.
2019-03-13 15:44:02 +02:00
Markus Mäkelä
e83555f126
Update release documentation
The update to VERSIONxx.cmake was not documented.
2019-03-13 14:09:00 +02:00
Markus Mäkelä
0df7228e5e
Add 2.2.20 release notes 2019-03-13 13:57:16 +02:00
Markus Mäkelä
e2ac52826a
MXS-2375: Provide aliases for [start|stop] maxscale
The `start services` and `stop services` command aliases now map to the
same command as `start maxscale` and `stop maxscale`. This should help
alleviate the confusion that the command naming caused.
2019-03-13 13:40:37 +02:00
Timofey Turenko
84e456eee2 ignore truncate() return in fwf_syntax test 2019-03-13 12:53:12 +02:00
Esa Korhonen
ac5ee1278c MXS-2271 Cleanup internal monitor header and its functions
Some functions still accessed the servers-array. Most functions are now
inside class. Removed unused defines.
2019-03-12 15:32:56 +02:00
Esa Korhonen
e7abc53b70 MXS-2304 Clean up configuration serialization
The parameters are now written in the order they appear in the module
parameter definitions. Also enabled a previously disabled part in
server unit test.
2019-03-12 12:51:23 +02:00
Esa Korhonen
f05a2317d9 Merge branch '2.3' into develop 2019-03-12 11:22:34 +02:00
Esa Korhonen
040562f718 MXS-2342 Run MariaDBMonitor diagnostics concurrent with the monitor loop
This fixes some situations where MaxAdmin/MaxCtrl would block and wait
until a monitor operation or tick is complete. This also fixes a deadlock
caused by calling monitor diagnostics inside a monitor script.

Concurrency is enabled by adding one mutex per server object to protect
array-like fields from concurrent reading/writing.
2019-03-12 10:50:16 +02:00
Esa Korhonen
a8949b2560 MXS-2271 Move free monitor functions into classes
Functions are divided to MonitorManager, Monitor, or the monitored
server.
2019-03-12 10:29:55 +02:00
Esa Korhonen
40f24aaaee MXS-2271 Remove m_monitor self pointer 2019-03-12 10:29:55 +02:00
Esa Korhonen
a8c878fbca MXS-2271 Remove unused setters
Runtime configuration changes now go through configure().
2019-03-12 10:29:55 +02:00
Esa Korhonen
1858fe9127 MXS-2271 Monitor modifications always go through Monitor::configure()
Previously, runtime monitor modifications could directly alter monitor fields,
which could leave the text-form parameters and reality out-of-sync. Also,
the configure-function was not called for the entire monitor-object, only the
module-implementation.

Now, all modifications go through the overridden configure-function, which calls the
base-class function. As most configuration changes are given in text-form, this
removes the need for specific setters. The only exceptions are the server add/remove
operations, which must modify the text-form serverlist.
2019-03-12 10:19:45 +02:00
Markus Mäkelä
703f65700a
Use INT with retain_last_statements
The default value is negative so the type must be INT in order to support
reading of serialized configurations.
2019-03-11 21:49:33 +02:00
Esa Korhonen
b07c53d532 Remove multi-master monitor
Was deprecated in 2.3. Similar features are in MariaDB-Monitor.

One system test was modified to use MariaDB-Monitor instead. Some parts
of the test are disabled for now to make it pass.
2019-03-11 17:50:15 +02:00
Esa Korhonen
b4c5500fa1 MXS-2362 Document SchemaRouter table-sharding limitations 2019-03-11 17:39:07 +02:00
Esa Korhonen
8abe1c8448 Merge branch '2.3' into develop 2019-03-11 15:46:18 +02:00
Esa Korhonen
c8078c99e5 MXS-2325 Fix Debian 8 compilation 2019-03-11 14:39:02 +02:00
Esa Korhonen
50f588db3e MXS-2370 Clarify query timeout warning message
The message now more clearly states if the failure was due to timeout or
a different Connector-C error.
2019-03-11 13:20:50 +02:00
Esa Korhonen
f76ae381c0 MXS-2325 Update documentation with the new behavior 2019-03-11 13:07:53 +02:00
Markus Mäkelä
1c3a5bda83
Merge branch '2.3' into develop 2019-03-11 12:29:56 +02:00
Markus Mäkelä
3081bfbb1e
Merge branch '2.2' into 2.3 2019-03-11 10:49:06 +02:00
Markus Mäkelä
c132125d55
Fix log truncation
Syslog wasn't truncated which caused massive disk space usage when the
full test set was run.
2019-03-11 10:47:44 +02:00
Markus Mäkelä
160b4e6e05
MXS-2368: Fix reading of non-tty input
The password input only worked if stdin was a TTY. This was caused by the
fact that the readline-sync library only worked for TTYs.
2019-03-11 10:47:43 +02:00
Markus Mäkelä
710e5df27b
MXS-2365: Fix classification of queued queries
Queries in the query queue need to be explicitly parsed since they are
stored in a single buffer and thus share the query classification
information. In the next major version this should be changed into an
array of individual buffers instead of a shared buffer.
2019-03-08 14:45:18 +02:00
Markus Mäkelä
5c5c6630bf
Fix retain_last_statements
If multiple statements were stored in a single buffer only one of them
would get registered.
2019-03-08 14:45:18 +02:00
Markus Mäkelä
7f27db02a8
Fix global retain_last_statements
The default value was wrong.
2019-03-08 14:45:18 +02:00
Timofey Turenko
444c120101 Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-03-08 13:55:07 +02:00
Markus Mäkelä
247e558ffa
Fix tls-model exposure to other modules
The flag was propagated to other modules that depend on it.
2019-03-08 12:10:31 +02:00
Markus Mäkelä
5005facfb1
Always dump the full configuration
Always storing runtime configuration changes prevents problems when the
change causes another parameter to change. One example of this is
transaction_replay that implicitly enables other parameters.
2019-03-08 12:10:31 +02:00
Markus Mäkelä
7db87784ac
Deliver hangups only to valid DCBs
If a DCB was closed and a hangup event was sent to it via
dcb_hangup_foreach shortly after it was closed, the DCB would still
receive it even if it was closed. To prevent this, events must only be
delivered to DCBs if they haven't been closed.
2019-03-08 12:10:30 +02:00
Markus Mäkelä
71a3cde441
MXS-2373: Fix filter serialization
The module of a filter was ignored as it wasn't in the list of expected
module parameters.
2019-03-08 12:10:30 +02:00
Timofey Turenko
c83868936a fix start_maxscale for valgrind case 2019-03-08 11:47:11 +02:00
Markus Mäkelä
18a30f05c2
Connect to master on read if master_accept_reads is on
The master should be considered as a valid target when master_accept_reads
is enabled but a connection to it has not yet been created.
2019-03-08 08:20:44 +02:00
Markus Mäkelä
bfc874dea1
MXS-2350: Connect on session command with lazy_connect
If a session command is executed when lazy_connect is enabled and no
connections have been created, a connection must be made. This makes sure
that the session isn't closed and that the client receives a response.
2019-03-08 08:20:44 +02:00
Markus Mäkelä
24ea222ed6
MXS-2350: Allow lazy connection creation
The lazy connection creation reduces the burden that short sessions place
on the backend servers. This also prevents the problems caused by early
disconnections that happen when only one server is used but multiple
connections are created. This does not solve the problem (MXS-619) but it
does mitigate it to acceptable levels.

This commit also adds a change to the weighting algorithm that prefers
existing connections over unopened ones. This helps avoid the
flip-flopping that happens when the absolute scores are very similar. The
hard-coded value might need to be tuned once testing is done.
2019-03-08 08:20:44 +02:00
Markus Mäkelä
95317725ce
Merge branch '2.3' into develop 2019-03-07 16:21:03 +02:00
Markus Mäkelä
267ec9cccc
Fix filter serialization
Filters were serialized with commas as separators instead of pipes.
2019-03-07 16:02:49 +02:00
Markus Mäkelä
48d2f3bd84
Correct REST-API-Tutorial 2019-03-07 15:59:27 +02:00