12893 Commits

Author SHA1 Message Date
Markus Mäkelä
b2bf4d125b
MXS-2313: Document rank
Added documentation along with a few examples of how the parameter behaves
and how it can be used.
2019-03-18 13:12:58 +02:00
Markus Mäkelä
9b6b5270f1
MXS-2313: Use 64-bit integers to store rank
Although the default value is the maximum value of a signed 32-bit
integer, the value is stored as a 64-bit integer. The integer type
conversion functions return 64-bit values so storing it as one makes
sense.

Currently values higher than the default are allowed but the accepted
range of input should be restricted in the future.
2019-03-18 13:12:58 +02:00
Markus Mäkelä
aeca0f8a31
MXS-2313: Use rank in readconnroute
The rank is used for both root master selection as well as normal
candidate selection.
2019-03-18 13:12:58 +02:00
Markus Mäkelä
4f0538a041
MXS-2313: Use rank in readwritesplit
Readwritesplit now respects server ranks. When servers are selected for
either routing or connection creation, the servers are partitioned by
their rank into sets of servers. These sets of servers are never mixed so
the end result is that only servers of the same rank are considered for
candidacy.

The master selection is slightly different: the server with the best rank
that is capable of acting as a master is chosen. This means that a session
can have a master with a lower rank and slaves with higher ranks than the
master. In most cases this actually is the preferred behavior as the rank
is used to prioritize usage but not outright prevent it.
2019-03-18 13:12:58 +02:00
Markus Mäkelä
ba448cb12c
MXS-2313: Clean up readwritesplit connection creation
The connection creation is now internal to RWSplitSession. This makes the
code more readable by removing the need to pass parameters and allowing
easier reuse of existing functions. The various conditions require to
create connections are now also checked in only one place.
2019-03-18 13:12:58 +02:00
Markus Mäkelä
54a09e93df
Move thread_local sorting buffers inside functions
This way the use of the buffers is obvious and it removes the possibility
of two functions accidentally sharing the same buffer.
2019-03-18 13:10:23 +02:00
Markus Mäkelä
0693514047
MXS-2313: Add server ranks
The servers now accept a rank parameter that tells which servers to
prioritize.
2019-03-18 13:10:23 +02:00
Markus Mäkelä
9e9cd0c596
MXS-2313: Pick best available master
Readwritesplit now picks the best available master if no open master
connection is available. This is required if the server rank is to be
taken into account when master selection is done.
2019-03-18 13:10:23 +02:00
Esa Korhonen
8251389813 Fix csmon configure
Prevented the monitor from starting.
2019-03-18 12:06:47 +02:00
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