Commit Graph

13213 Commits

Author SHA1 Message Date
510cae2fe0 Allocate DCB on owning thread
The DCB is now fully allocated on the thread that owns it. This guarantees
that the owner is always correct when it is used.

The code in poll_add_dcb still manipulates which worker the DCB is
allocated. This needs to be removed and the detection of special needs
(maxadmin, maxinfo) must be moved into the listener.
2019-04-26 11:40:30 +03:00
dc244342f8 Prevent assignments in assertions
Using the else branch instead of explicitly negating the assertion makes
sure the compiler catches assignments in assertion expressions.
2019-04-26 11:40:30 +03:00
fd51048640 Don't align function parameters
The function parameters in declarations are not aligned.
2019-04-26 11:40:30 +03:00
c5b6693fce Enable struct initializer alignment
Uncrustify 0.68 fixed the addition of extra spaces after the last
argument.
2019-04-26 11:40:30 +03:00
01b1d469a8 MXS-2435 Handle recoverable Clustrix errors
If
- transaction replay is enabled,
- an error is returned and
- the error is one of the recoverable Clustrix errors
we will retry the transaction.

If it succeeds, then the client will not notice anything but
for a short delay.

Note that the error message is looked for irrespective of whether
the backend is Clustrix or not. However, as errors are not common
the price for doing that can probably be ignored.

However, a bigger problem is that explicit knowledge of different
backends should *not* be coded into routers.
2019-04-26 10:54:57 +03:00
d8a9405998 MXS-2435 Refactor error message extracting
Access to the error message is needed in different contexts.
Now the extraction code itself can be shared.
2019-04-26 10:54:57 +03:00
d186244261 Add test for class Host 2019-04-25 15:27:10 +03:00
4947081377 The std::ostringstream was incorrectly cleared in the LOG macro. 2019-04-25 15:24:10 +03:00
fadbc0b1ae Separate Monitor management to its own file
Allows better separation of file local data. Also allows moving monitor-
related code from config_runtime.cc.
2019-04-25 12:32:41 +03:00
3ac117ed1d Merge branch 'develop' of github.com:mariadb-corporation/MaxScale into develop 2019-04-24 22:04:19 +03:00
820ff756a7 Fix test_config2
The static structures referred to non-static data.
2019-04-24 18:01:28 +03:00
f6c6415c4f Add build test deps specific for 2.4 2019-04-24 15:41:15 +03:00
6aedcc085f Remove references to NDB server state 2019-04-24 14:15:56 +03:00
810dc06d5c Document removal of ndbclustermon and mmmon 2019-04-24 14:06:27 +03:00
1e84742cbb Remove ndbclustermon 2019-04-24 14:02:18 +03:00
88a9ca8b68 Document removal of debugcli and telnetd 2019-04-24 14:01:31 +03:00
691dc4d1b6 Remove telnetd and debugcli
The modules were deprecated.
2019-04-24 14:01:31 +03:00
4ad60fa2a2 Merge branch '2.3' into develop 2019-04-24 13:29:04 +03:00
b972d88bba Merge branch '2.2' into 2.3 2019-04-24 12:51:32 +03:00
e331b7f432 Add a generic to_string() function. 2019-04-24 12:39:58 +03:00
8b7b7b4d3f Add a streamable class (Host) that represents an address and port,
or a unix domain socket.
2019-04-24 12:38:04 +03:00
64a8288f66 MXS-2426 Document the change in cluster operation failure handling 2019-04-24 12:37:55 +03:00
75c0ac5323 Move items from MonitorWorker to MonitorWorkerSimple
MonitorWorker only enforces the use of a worker thread but otherwise
does not define how the monitor is implemented.
2019-04-24 11:27:11 +03:00
2bc0b9c875 Don't ignore getcwd return value
The return value should be used.
2019-04-24 11:08:34 +03:00
f8c964163f Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-04-23 13:46:53 +03:00
b7e9d8e189 remove maxscale-system-test/cnf/maxscale.cnf.template.replication.one_slave_big as soon as it is generated automatically 2019-04-23 12:33:23 +03:00
0f8b7450b1 Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-04-23 12:29:33 +03:00
be7f5ad1c8 remove maxscale-system-test/cnf/maxscale.cnf.template.replication_big as soon as it is generated automatically 2019-04-23 12:28:24 +03:00
a60e3c275c Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-04-23 12:24:58 +03:00
4186f39616 Merge branch '2.3' into develop 2019-04-23 12:11:09 +03:00
9e3f0aab5a Extract client address before allocating the DCB
By extracting the address before the session is started, we can refuse the
connection if there are too many connections from that particular host.
2019-04-23 11:57:10 +03:00
d60ec9e281 Fix test_config2
If the /etc/maxscale.modules.d/ didn't exist or wasn't accessable by the
current user, the test would fail.
2019-04-23 11:57:10 +03:00
5e6107d451 MXS-2441: Add galera with slaves test case
The test checks that servers replicating from Galera nodes work as
expected.
2019-04-23 11:57:10 +03:00
111ab8f5e4 MXS-2441: Document galeramon changes
Added a section that describes how galeramon behaves when it is configured
to monitor non-Galera servers that are replicating from Galera nodes.
2019-04-23 11:57:10 +03:00
60c1b15d60 MXS-2441: Add slave support to galeramon
Slaves that replicate from galeramon now get the Slave status if they are
replicating from a joined Galera node.
2019-04-23 11:57:10 +03:00
dda813f3aa MXS-2441: Extend maxsql extraction functions
Having helper methods that combine the index position search and value
extraction make it easier to deal with results that have a lot of fields
e.g. the output of SHOW SLAVE STATUS.
2019-04-23 11:57:10 +03:00
ba79028a46 Add debug assertions into the core
The assertions make sure DCB writes and reads are only done by the thread
that owns them.
2019-04-23 11:46:38 +03:00
f41ce6db16 Update maintenance version for 2.3 2019-04-23 11:20:38 +03:00
a8639c3226 Merge branch '2.3.6' into 2.3 2019-04-23 11:20:09 +03:00
2d8a93e88d Update 2.3.6 release date 2019-04-23 11:17:01 +03:00
24fc82e160 Move large query processing inside RWBackend
The knowledge of which function to call can be internal to RWBackend. This
make the use of the class easier as one can simply write to the backend.
2019-04-18 13:58:34 +03:00
3e41a601f8 MXS-2411: Implicitly use latest API version
The request API prefix is now simply ignored as it has no meaning as long
as there is a single version of the API.
2019-04-18 13:58:34 +03:00
7fc3527e1d Check for Docker in run_npm_test.sh
Lack of Docker can cause build failure
To avoid it if Docker is not available
test is not started, simply returns 0
It is hard to make Docker installation reliable especially for very old or very new distros
2019-04-18 12:10:24 +03:00
a471417150 MXS-1922: Show GTIDs for Galera nodes
Galera generates GTIDs even if they are unique across all nodes and it
makes sense to display this.
2019-04-18 12:04:56 +03:00
524a083203 MXS-2439 Do not classify implicit commits as commits
The type mask of CREATE, ALTER, etc. that cause an implicit commit
will no longer contain the bit QUERY_TYPE_COMMIT.

As an implicit commit does not change the transaction state as seen
by MaxScale, it does not make sense to claim that the statement is
a commit.
2019-04-18 11:19:23 +03:00
b9e6384a41 Adding streaming log macros. 2019-04-18 10:42:39 +03:00
ddf9002e86 Add tests with big backend
Basic tests can be executed with 15 machines Master/slave backend. Tests have label BIG_REPL_BACKEND Default template modified to support big backend. Tests temporaraly labeled as UNSTABLE to prevent their execution nightly
For big test maxscale.cnf is automatically generated for any number of nodes
2019-04-18 09:48:39 +03:00
802a19879b Merge branch '2.3' of github.com:mariadb-corporation/MaxScale into 2.3 2019-04-18 09:29:20 +03:00
f90863761e remove unneccesary __cxx11 2019-04-18 03:48:51 +03:00
4e2b6d6cb3 Add maxscale-system-test dependecies installation script 2019-04-18 03:44:02 +03:00