Commit Graph

13128 Commits

Author SHA1 Message Date
4400876b46 Update release date 2019-03-15 11:41:13 +02:00
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
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
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
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
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
e83555f126 Update release documentation
The update to VERSIONxx.cmake was not documented.
2019-03-13 14:09:00 +02:00
0df7228e5e Add 2.2.20 release notes 2019-03-13 13:57:16 +02:00
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
84e456eee2 ignore truncate() return in fwf_syntax test 2019-03-13 12:53:12 +02:00
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
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
f05a2317d9 Merge branch '2.3' into develop 2019-03-12 11:22:34 +02:00
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
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
40f24aaaee MXS-2271 Remove m_monitor self pointer 2019-03-12 10:29:55 +02:00
a8c878fbca MXS-2271 Remove unused setters
Runtime configuration changes now go through configure().
2019-03-12 10:29:55 +02:00
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
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
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
b4c5500fa1 MXS-2362 Document SchemaRouter table-sharding limitations 2019-03-11 17:39:07 +02:00
8abe1c8448 Merge branch '2.3' into develop 2019-03-11 15:46:18 +02:00
c8078c99e5 MXS-2325 Fix Debian 8 compilation 2019-03-11 14:39:02 +02:00
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
f76ae381c0 MXS-2325 Update documentation with the new behavior 2019-03-11 13:07:53 +02:00
1c3a5bda83 Merge branch '2.3' into develop 2019-03-11 12:29:56 +02:00
3081bfbb1e Merge branch '2.2' into 2.3 2019-03-11 10:49:06 +02:00
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
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
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
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
7f27db02a8 Fix global retain_last_statements
The default value was wrong.
2019-03-08 14:45:18 +02:00
444c120101 Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-03-08 13:55:07 +02:00
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
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
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
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
c83868936a fix start_maxscale for valgrind case 2019-03-08 11:47:11 +02:00
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
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
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
95317725ce Merge branch '2.3' into develop 2019-03-07 16:21:03 +02:00
267ec9cccc Fix filter serialization
Filters were serialized with commas as separators instead of pipes.
2019-03-07 16:02:49 +02:00
48d2f3bd84 Correct REST-API-Tutorial 2019-03-07 15:59:27 +02:00
5b43940559 Track session state only when required
The protocol should not track the session state as the parsing is quite
expensive with the current code. This change is a workaround that enables
the parsing only when required. A proper way to handle this would be to do
all the response processing in one place thus avoiding the duplication of
work.
2019-03-07 15:59:26 +02:00
b97976c4ee MXS-2323: Close stale connections
Cleaning up and closing stale connections to servers in maintenance mode
helps administrators see when a server is no longer in use.
2019-03-07 15:59:26 +02:00
a7be3c527c Remove unnecessary memory allocations
Given the fact that there exist only three possible categories, the map
can be replaced with a static array that needs no memory
allocations. Making this array thread-local allows it to be reused which
places an upper limit on the number of memory allocations.
2019-03-07 15:59:26 +02:00
e7f739e95d MXS-2337 Fix sharding test
There is now enought time between queries that the shard map is reconstructed.
2019-03-07 13:07:20 +02:00
4208dff2e6 MXS-2337 Schemarouter responds correctly to SHOW TABLES
The router now handles the query similarly to a "SHOW TABLES FROM X"
with the current db assigned to X.
2019-03-07 13:07:20 +02:00
9572ff84ea Merge branch '2.3' into develop 2019-03-05 10:37:56 +02:00