12062 Commits

Author SHA1 Message Date
Markus Mäkelä
70dfb447a2
Use normal config for bug681
The test doesn't require Galera backends.
2018-11-09 09:13:25 +02:00
Markus Mäkelä
df003a3e7c
Use normal config for server_weight
The backends used for the test don't have to be Galera servers as the
functionality is generic.
2018-11-09 09:13:25 +02:00
Markus Mäkelä
8c9ecf2756
Remove redundant tests
The tests tested generic functionality and the backend type should not
affect the test results.
2018-11-09 09:13:25 +02:00
Markus Mäkelä
ccec2a387a
Fix replication in parallel
If the replication is broken between the nodes, it is now fixed in
parallel on all nodes instead of doing it one server at a time.

This reduces the time from about 120 seconds to 13 seconds. The time was
measured by running the check_backend test first with all backends broken
and then with the fixed backends subtracting time of the latter from the
former.
2018-11-09 09:13:25 +02:00
Markus Mäkelä
04e4f17618
Sort tests by replication type
The tests that require GTID replication are now all grouped together. This
removes the need to reconfigure the test environment multiple times.
2018-11-09 09:13:25 +02:00
Markus Mäkelä
3a5b49caf1
Speed up mxs1751_available_when_donor_crash
As the wait_for_monitor function guarantees that the monitor notices the
state change, we can skip the replication fixing which was somewhat
superficial in the first place.
2018-11-09 09:13:25 +02:00
Markus Mäkelä
c523bf74b8
Rewrite binlog_change_master tests
The tests were consistently unstable and as a result of this did not
provide any actionable output. In addition to this these two test were the
longest running tests in the whole MaxScale test suite so a re-design was
warranted.

Instead of emulating a client and a server failure, testing functionality
provides for a test that is faster, more precise and provides more
actionable output. Due to the single-threadedness of the new test, no
cross-thread depencies are present. In addition to this, the superfluous
log flushing was not done as it almost always happened after all
transactions were already complete.

The estimated savings in test time alone is around 1100 seconds (roughly
18 minutes).
2018-11-09 09:13:25 +02:00
Markus Mäkelä
b77d5568d8
Add output to mxs1743_rconn_bitmask
This helps analyze why the test is hanging when the slaves are synced.
2018-11-09 09:13:24 +02:00
Esa Korhonen
ecc7442358 Detect manual commands faster
Previous, MariaDBMonitor would wait until the next monitor interval before detecting
a new manual command. The commands are now checked every 100 ms.
2018-11-08 19:12:00 +02:00
Johan Wikman
8058e46309 Add link to maxctrl 2018-11-08 13:52:54 +02:00
Johan Wikman
112c25ab1f MXS-1780 Update release notes 2018-11-08 13:50:42 +02:00
Markus Mäkelä
d65269fabb
Always process responses inside RootResource
The REST API would skip propagation of the requests to the RootResource if
it was a request to the empty resource.
2018-11-08 12:14:36 +02:00
Markus Mäkelä
7d54df74dc
Hard-code minimum suggestion distance to 4
This way only close matches are suggested.
2018-11-08 12:14:36 +02:00
Johan Wikman
809d3549ae MXS-2149 Add REST-API watchdog
This will simply cause a task to be posted to each worker.
If the workers are running normally, the task will reach the
workers and the associated semaphore posted, and the REST-API
call will return. If any worker is not running normally, the
task will not be processed and the REST-API call will hang.
2018-11-08 12:13:02 +02:00
Johan Wikman
1ca03fb85c MXS-1780 Show last queries of session
'maxctrl show sessions' now show last queries of session, if
the retaining of statements has been enabled.
2018-11-08 12:08:42 +02:00
Johan Wikman
99bd621874 MXS-1780 Adjust maxctrl output according to console width
Figure out the console width and adjust output accordingly.
In default mode use '\n' as separator (necessary for making the
session query output sensible) and in tsv mode ','.
2018-11-08 12:08:42 +02:00
Johan Wikman
32f2e769f4 MXS-1780 Make retain_last_statements service specific 2018-11-08 12:08:42 +02:00
Johan Wikman
2bd2b4a32e MXS-1780 Report times using localtime instead of gmtime 2018-11-08 12:08:42 +02:00
Johan Wikman
dd712a06fa MXS-1780 Make statement retaining session specific
Whether or not a session should retain its statements is now
a property of the session. This in preparation for making the
whole functionality a property that can be enabled and disabled
at runtime, of the service.
2018-11-08 12:08:42 +02:00
Johan Wikman
c899f00541 MXS-1780 Collect server response information
As the router is the only one that knows what backends a particular
statement has been sent to, it is the responsibility of the router
to keep the session bookkeeping up to date. If it doesn't we will
know what statements a session has received (provided at least some
component in the routing chain has RCAP_TYPE_STMT_INPUT capability),
but not how long their processing took. Currently only readwritesplit
does that.

All queries are stored and not just COM_QUERY as that makes the
overall bookkeeping simpler; at clientReply() time we do not need to
know whether or not to bookkeep information, we can just do it.

When session information is queried for, we report as much information
we have available.
2018-11-08 12:04:55 +02:00
Johan Wikman
c78c5a615d MXS-1780 Store time when statement was received 2018-11-08 12:03:50 +02:00
Johan Wikman
c6378e1006 MXS-1780 Make retained statements available via REST-API 2018-11-08 12:03:50 +02:00
Johan Wikman
fa13b8036a MXS-1780 Store last statement as cloned GWBUF
The last statements of a session are now stored as a cloned
GWBUF instead of as a copy of the SQL.
2018-11-08 12:03:50 +02:00
Niclas Antti
3ccdb508de Fix bug in roulette wheel
Slot values were changed after the total was calculated. Fix bug
and adjust the offending code.
2018-11-08 10:50:23 +02:00
Niclas Antti
c692c864e2 MXS-2078 Take new statistics into use 2018-11-08 10:44:32 +02:00
Niclas Antti
5175d2b2d7 MXS-2078 Add support for holding router specific server data.
New class to hold the statistics, part of which is currently in
RWSplitSession. Simple API in Backend to create session
specific data.
2018-11-08 10:44:32 +02:00
Niclas Antti
13a0390de6 MXS-2078 Add IntervalTimer
IntervalTimer is used for accumulating intervals (i.e. durations) over sections of code.
2018-11-08 10:44:32 +02:00
Esa Korhonen
56d28d703c Update MariaDBMonitor documentation
Mention the secondary use of switchover_timeout. Formatting fixes.
2018-11-08 10:33:57 +02:00
Johan Wikman
07d497a672 Add empty line before numbered list in md-doc
Without that empty line, the numbered list will not be a numbered
list when the md-file is imported into KB.
2018-11-08 09:47:01 +02:00
Esa Korhonen
8f8e92684a Ensure that correct slave is promoted
Should make the test more likely to succeed.
2018-11-07 12:55:59 +02:00
Esa Korhonen
fb3ccc94d6 MXS-1944 Cleanup function parameters
The naming and ordering is now a bit more consistent between promote() and demote().
2018-11-07 12:55:59 +02:00
Esa Korhonen
e4e2235297 MXS-1944 Use time limited methods in rejoin
Uses switchover time limit, since the typical rejoin of a standalone server
is somewhat similar to a switchover.
2018-11-07 12:55:59 +02:00
Esa Korhonen
184e187732 Different cluster operations use different parameter types
Only the parameters used by all operations are in the common class.
2018-11-07 12:55:59 +02:00
Esa Korhonen
a4ce4e4613 MariaDBServer no longer uses ClusterOperation
The functions in the server class now only use the general parameters object.
2018-11-07 12:55:59 +02:00
Esa Korhonen
8877e7180b Continue separation of ClusterOperation elements 2018-11-07 12:55:59 +02:00
Esa Korhonen
90e6ff078a Divide ClusterOperation to two types
The main class was getting unwieldly and too general. Dividing the fields
helps adding support for other operation types.

This commit leaves most data duplicated, later commits clean up the affected code.
2018-11-07 12:55:59 +02:00
Esa Korhonen
09c5e295d0 Update MariaDBMonitor documenation
Adds table of contents, a mention of semisynchronous replication and clarifies
disk space parameters a bit.
2018-11-07 12:54:22 +02:00
Markus Mäkelä
4daffb5e2f
MXS-2147: Fix luafilter includes
The filter now correctly includes C headers.
2018-11-06 21:35:53 +02:00
Markus Mäkelä
11a756a028
Detect undefined references at link time
Instruct the linker to make sure all symbols are resolved at link time.
2018-11-06 21:34:28 +02:00
Markus Mäkelä
774e9d1efb
Fix merge problems
The values were not removed from the merge.
2018-11-06 21:18:42 +02:00
Markus Mäkelä
383b0b1989
Merge branch '2.2' into 2.3 2018-11-06 21:12:20 +02:00
Markus Mäkelä
c3c257719d
MXS-2136: Add notes about deprecation
The parameter documentation now mentions that the old 'passwd' is
deprecated.
2018-11-06 15:09:14 +02:00
Markus Mäkelä
a99ab62cb7
MXS-2136: Convert 'passwd' to 'password'
The old 'passwd' parameter is now converted to the 'password' parameter
and a warning about its deprecation is logged. This keeps the mandatory
parameter detection functional while still allowing old-style
configurations to be used.
2018-11-06 15:09:14 +02:00
Markus Mäkelä
f7f6bcea9e
Add parameter name suggestions
If an unknown parameter is detected, a suggestion is now given from the
set of known parameters if they are similar enough.
2018-11-06 15:09:14 +02:00
Markus Mäkelä
a883a4f3e0
Fix password documentation
The old parameter was used in some examples and no note about its removal
was in the parameter.
2018-11-06 15:09:14 +02:00
Markus Mäkelä
3300bfd17f
Remove test for passwd removal
Configs with passwd are still accepted in 2.3.
2018-11-06 15:09:14 +02:00
Markus Mäkelä
113b1503f6
Expand readwritesplit delayed retry error message
The error now explains if the write failure was due to the
delayed_retry_timeout being reached.
2018-11-06 15:09:14 +02:00
Markus Mäkelä
4341c2b6e2
MXS-2142: Set causal_reads_timeout default to 10
The causal_reads_timeout default value is too long when considering the
behavioral changes that MXS-2141 introduced. With a 10 second default
value, a result is returned to the client in a reasonable amount of time.
2018-11-06 15:09:14 +02:00
Markus Mäkelä
e56372b153
MXS-2141: Retry query on master if it times out on slave
With causal_reads enabled, the query would return with an error if the
slave was not able to catch up to the master fast enough. By automatically
retrying the query on the master, we're guaranteed that a valid result is
always returned to the client.
2018-11-06 15:09:14 +02:00
Markus Mäkelä
c661f5e838
MXS-2139: Extend transaction_replay requirements
Enabling transaction_replay now automatically enables
master_failure_mode=fail_on_write. This makes the behavior consistent
across all failure modes.
2018-11-06 15:09:14 +02:00