Commit Graph

11362 Commits

Author SHA1 Message Date
c01840ffb3 Remove unnecessary SConfig from readwritesplit
The configuration doesn't need to be contained in shared pointer as each
session holds its own version of it. This removes most of the overhead in
configuration reloading. The only thing that's left is any overhead added
by the use of thread-local storage.
2018-08-06 21:20:29 +03:00
403b9e09f5 Remove old LICENSE file
The tests had it from the time before they were merged into MaxScale.
2018-08-06 21:19:49 +03:00
7425d80436 Increase query_retries for mxs1507_migrate_trx
The switchover sometimes fails due to a broken connection when the STOP
SLAVE on the new master is executed. Nothing is logged on the server in
question and the error message simply states that the connection was lost
in the middle of a query.

Increasing the query_retries to 1 reduced the likelihood of failure from
about 1/3 of tests failing to roughly 1/6 of tests failing. Increasing it
to 5 seems to remove it completely. As to what is the real reason this
happens, we do not yet know.
2018-08-06 21:19:48 +03:00
376cd3aa9e Enable query_retries by default
Enabling it with a value of 1 should remove the vast majority of
connection related problems that appear in MaxScale. This should filter
out most of the errors caused by transient network problems.
2018-08-06 21:19:48 +03:00
0795d60007 Use MASTER_GTID_WAIT in binlog tests
This should help with the slave synchronization problem.
2018-08-06 21:19:48 +03:00
0a81f78442 Use unique pointer instead of auto-pointer 2018-08-06 13:24:05 +03:00
c0bd5ca3a1 MXS-1905 Switchover if master is low on disk space
Required quite a bit of refactoring.
2018-08-06 13:24:05 +03:00
84b3e4672f Merge branch '2.2' into develop 2018-08-06 13:08:55 +03:00
ec178fd8da MXS-1983 Add missing semicolon 2018-08-06 12:59:13 +03:00
6945e82b3f Merge branch '2.2' into develop 2018-08-06 12:31:58 +03:00
05129540b4 Update change log and release notes 2018-08-06 12:10:12 +03:00
5b04e492c6 MXS-1983: Retry message posting
If the posting of a message to a message queue fails due to the queue
being full, it is retried for a limited number of times. This is a
temporary fix to the problem that fixing MXS-1948 introduced. A proper
solution that leverages SO_REUSEPORT should be implemented in the next
major release.
2018-08-03 23:29:25 +03:00
6fc3fbd697 Fix debug assertion when a DCB is printed
All DCBs don't have the server pointer set so it needs to be checked
before calling any functions that take a server as a parameter.
2018-08-03 10:34:50 +03:00
d22b02047f Disable parameters on main worker
Disabling the parameter on the main worker prevents deadlocks if the
parameter is disabled at the same time a monitor diagnostic is executed.
2018-08-03 10:34:47 +03:00
0d934476b0 MXS-1992 Provide std::default_delete<json_t> 2018-08-03 07:33:12 +03:00
166ecfead6 MXS-1992 MaxAdmin uses RoutingWorker for QC stats 2018-08-03 07:33:12 +03:00
b76cdc944b MXS-1992 RoutingWorker provides access to QC stats
This will be used in the context of MaxAdmin and MaxCtrl.
2018-08-03 07:33:12 +03:00
c302268ca3 MXS-1992 Provide maxadmin if for getting qc stats
- Equivalent functionality will be provided for maxctrl.
- Functionality for obtaining the data will be moved to RoutingWorker.
2018-08-03 07:33:12 +03:00
ae27ea92a0 MXS-1992 Thread-initialize internal QC module 2018-08-03 07:33:12 +03:00
25536af91f MXW-1992 Update size when inserting 2018-08-03 07:33:12 +03:00
1f5e23c674 MXS-1997: Increase object name length limits
Updated the limits to 1023 characters and documented the old value.
2018-08-02 22:12:06 +03:00
46ed043fb0 Display diagnostics for running monitors
If a monitor is not running, the diagnostics function will not be called.
2018-08-02 18:56:36 +03:00
be6a404c0b Fix crash on failure to create service
The service would not be in the list if it failed before it was placed
there. Moving the actual freeing of memory into the Service destructor
allows it to be called directly when we know the service is not in the
list. This also only allows valid services to be placed into the global
list of services.

To prevent freeing a partially constructed service, the memory allocation
checks were replaced with a runtime assertion. This can be changed when
the creation of the service is done only at a point where we know it can't
fail. Currently, the createInstance call expects the service as a
parameter which prevents this.
2018-08-02 18:56:36 +03:00
d412b8d729 Move execute_worker_task into mxs::Worker
The function has use outside of the monitors as it makes execution of
worker tasks much more convenient. Currently, this change only moves the
code and takes it into use: there should be no functional changes.
2018-08-02 18:56:35 +03:00
107395f608 Fix debug assertion on MaxScale shutdown
The assertion didn't take into notice whether teardown had started.
2018-08-02 18:56:35 +03:00
8cd07def80 Add timeout to mxs1929_service_runtime
Some of the commands appear to be hanging.
2018-08-02 18:56:35 +03:00
b14cfea7e3 Fix alloc-dealloc mismatch
The filter was deleted using free but allocated with new.
2018-08-02 18:56:34 +03:00
8b9f7cc458 Fix alter_router configuration
The stale slave detection is needed.
2018-08-02 18:56:22 +03:00
a5e7c08973 MXS-1992 Pre-increment provides a slight benefit 2018-08-02 14:16:53 +03:00
e637acd0a2 MXS-1992 Canonicalize using std::string
Significantly reducing the number of allocations done.
2018-08-02 14:16:53 +03:00
bcdab394c1 MXS-1992 Provide canonical function for std::string 2018-08-02 14:16:53 +03:00
81297fb919 Update naming convention for structs
The earlier guideline was just a "formalization" of existing
conventions.
2018-08-02 14:16:53 +03:00
836db54800 Clean up server status printing
Uses mostly the status functions for reading the flags. Strickly
speaking this breaks the REST API since in some cases (status combinations)
the printed string is different from what was printed before.
2018-08-02 10:42:12 +03:00
f7e3d4c2fb Remove maxscale/thread.hh
A C++11-like implementation of thread, future, etc. that now is
obsolete as we use C++11.
2018-08-01 17:12:49 +03:00
9e084753b0 Reduce test verbosity on failure
The tests should stop attempting any queries after the first failure.
2018-08-01 16:48:05 +03:00
359f61c73b Improve shutdown signal safeness
The signal handler no longer acquires the service list lock which removes
a number of deadlock possibilities from the shutdown process. Instead, a
global shutdown flag is set that serves the same purpose as the individual
service shutdown flags did.
2018-08-01 16:48:05 +03:00
8a248dd930 Copy callbacks by value in mxs_rworker_broadcast
Copying by reference will not work as the references will refer to the
values passed to the function, not the actual callbacks.
2018-08-01 16:48:04 +03:00
2939779052 Merge branch '2.2' into develop 2018-08-01 16:47:19 +03:00
47c89d5b89 Remove duplicate variable
Caused by rebasing changes. Also fixed the comment to reflect the current
situation.
2018-08-01 15:06:39 +03:00
a0b0f7993e Create servers in configuration order
As we know servers don't have dependencies, we can construct them in
configuration file order.
2018-08-01 15:02:02 +03:00
f68da38b32 Clean up get_shard_target in schemarouter
get_shard_target had become little bloated with the recent changes so
some routing cases were moved to their own functions. Also removed
some code that was not needed.
2018-08-01 11:55:31 +03:00
ef7fa7f879 MXS-1992 Implement cache size control
The cache now enforces the defined maximum size by evicting some
entries in case the insertion of a new entry would cause the max
size to be exceeded. Currently the eviction algorithm simply
removes a random element.
2018-08-01 11:10:34 +03:00
466e8a923c MXS-1992 Handle 'query_classifier_cache_size' parameter
No effect yet on the caching.
2018-08-01 11:10:34 +03:00
6d5210b4cb MXS-1992 Add qc cache documentation 2018-08-01 11:10:34 +03:00
f584b481eb MXS-1992 Add program for measuring cache performance
With this program it is possible to find out the difference in
performance between cached and non-cached query classification.
2018-08-01 11:10:34 +03:00
18180cd4ac MXS-1624 Also explicit parsing should utilize the cache 2018-08-01 11:10:34 +03:00
a6afc7fcbd Update 2.2 version number
Updated version to 2.2.13 in preparation for the next release.
2018-07-31 22:53:11 +03:00
a91b054eb4 Fix out-of-source runs of mxs791_galera.sh
The test used the current directory instead of the source directory where
the script was located.
2018-07-31 22:53:10 +03:00
ec420332ea MXS-1929: Take ResultSet into use
Replaced the previous RESULTSET with the new implementation. As the new
ResultSet doesn't have a JSON streaming capability, the MaxInfo JSON
interface has been removed. This should not be a big problem as the REST
API offers the same information in a more secure and structured way.
2018-07-31 22:50:08 +03:00
8ababa1d39 MXS-1929: Make core ResultSet functions private
The functions in the core that generate a ResultSet are now private.
2018-07-31 22:32:32 +03:00