Commit Graph

12857 Commits

Author SHA1 Message Date
146b940245 Dump statements on fatal signal
This should make it easier to figure out what is going on at the time of
the crash if statement collection is enabled.
2019-07-19 12:03:36 +03:00
e3b1eebb15 Update unit test configs
Removed some of the useless parameters, tuned some values and reordered it
to declare objects before they are referred to.
2019-07-19 12:03:36 +03:00
1ddcbc9ae1 Log error message on slave session command failure
If the slave's response differs from the master and the slave sent an
error packet, log the contents of the error. This should make it obvious
as to what caused the failure.
2019-07-18 17:58:22 +03:00
84f4688ebb Fix readwritesplit response count assertion
The assertion in routeQuery that expects there to be at least one ongoing
query would be triggered if a query was received after a master had failed
but before the session would close. To make sure the internal logic stays
consistent, the error handler should only decrement the expected response
count if the session can continue.
2019-07-18 12:24:06 +03:00
f8ee11cf55 MXS-2606: Sort servers before loading users
By sorting the servers in descending order based on their role we make
sure that the users are loaded from a master if one is available.
2019-07-17 14:42:32 +03:00
f139991a2c MXS-2559: Log source of loaded users
MySQLAuth now logs the server where the users were loaded from. As only
the initial loading of users causes a log message, it is still possible
for the source server to change without any indication of it.
2019-07-17 10:23:48 +03:00
3649efde0b MXS-2605: Remove false debug assertion
The assertion doesn't count executed session commands and thus is not
reliable.
2019-07-16 21:45:36 +03:00
c878d796be Merge branch '2.2' into 2.3 2019-07-16 12:59:03 +03:00
bc2f7f4040 MXS-2597: Log libmicrohttpd errors on startup
By enabling the debug messages only at startup, we'll get log messages for
any daemon startup failures and we exlude the verbose parsing errors that
malformed requests cause.
2019-07-16 10:03:27 +03:00
797069df52 Fix npm audit warnings
Updated lodash to a newer version.
2019-07-16 09:34:15 +03:00
ee83a6ca0d fix memory leak on handling COM_CHANGE_USER 2019-07-12 11:52:23 +03:00
8c84a2b2a4 Fix error detection in service creation
If a server that did not exist was added to the service, the error would
not cause a startup failure.
2019-07-11 09:39:06 +03:00
0394c9c525 MXS-2449: Fix maxinfo monitor status output
The status use an AND operation when it should do an equality comparison.
2019-07-10 12:38:10 +03:00
3e686e0ba5 Extend stacktrace printing
There was a case that wasn't handled which would happen with
executables. Also removed the path truncation to show where the library
was loaded from.
2019-07-10 11:06:52 +03:00
9de06a52b0 Allow infinite refreshes of users
The hard limit of 10 seconds is too strict when taking into account the
fact that infinite refreshes was possible before the bug was fixed. This
also makes testing a lot easier where rapid reloads are necessary.
2019-07-10 11:06:52 +03:00
21dfcb5648 Fix COM_STMT_LONG_DATA routing
The initial COM_STMT_LONG_DATA would not trigger the "pinning" of the
statement to a known node.
2019-07-10 11:06:51 +03:00
a91726100c Merge branch '2.2' into 2.3 2019-07-10 09:09:24 +03:00
c7d90636b0 MXS-2594: Fix priority usage without node priorities
The first node without a priority would be chosen as the candidate master
and the rest would be ignored. The code must check if neither of the two
nodes have priorities and if so must choose the better one.
2019-07-10 09:06:27 +03:00
8a176d64aa MXS-2490: Add direct execution support
Certain MariaDB connectors will use the direct execution for batching
COM_STMT_PREPARE and COM_STMT_EXECUTE execution without waiting for the
COM_STMT_PREPARE to complete. In these cases the COM_STMT_EXECUTE (and
other COM_STMT commands as well) will use the special ID 0xffffffff. When
this is detected, it should be substituted with the ID of the latest
statement that was prepared.
2019-07-09 14:59:52 +03:00
5aa9daaeea Improve stack trace printing
The stacktrace now removes leading paths from object files and common
source code prefixes. It also skips the first five frames which are always
inside the stacktrace printing code and the signal handler.
2019-07-09 10:56:08 +03:00
1b69e659db Assert DCB ownership in dcb_drain_writeq
This will cause EPOLLOUT events for maxscaled to trigger the assert
immediately if the buffer was placed into the queue by another worker.
2019-07-08 12:37:35 +03:00
e658dca4fe Allow rapid reloading of users on startup
This fixes the test failures that stem from users being created right
after maxscale has started. This also should make startups a bit smoother
now that the default value of users_refresh_time has been fixed.
2019-07-08 11:32:16 +03:00
1c96dc9769 Update download link 2019-07-08 08:17:48 +03:00
2238faa913 Make response time lock server-specific
There's no global data being modified inside the method call so a instance
level lock is sufficient.
2019-07-07 21:20:28 +03:00
e516c11ac5 MXS-2587: Never route stored queries in routeQuery
This could end up in infinite mutual recursion if no responses are
expected. Although this does not happen now that MXS-2587 is fixed, the
code should not even be there.
2019-07-05 14:19:44 +03:00
7270ff7ac0 Use 10.3 for REST API and MaxCtrl tests 2019-07-05 14:19:44 +03:00
edbbafc2e9 MXS-2502 Fix access denied when connecting to 'information_schema' 2019-07-05 10:37:31 +03:00
be8f4fe055 MXS-1901: Route related PS commands to same server
All COM_STMT_SEND_LONG_DATA commands and the COM_STMT_EXECUTE that follows
it must be sent to the same server. This implicitly works for masters but
with multiple slave servers the data could be sent to the wrong server.

By using the code added for MXS-2521, this problem can now be easily
solved by checking what the previous command was.
2019-07-04 09:37:09 +03:00
847d673f07 Merge branch '2.3.9' into 2.3 2019-07-04 09:26:47 +03:00
c09a54640d Update 2.3.9 release date
And update Jira list as well.
2019-07-04 08:59:43 +03:00
953dd4098b MXS-2587: Prevent queries after failed trx replay
If a transaction replay fails, no queries must be routed before the
connection is closed. This could happen if the client received the error
from the replay failure and closes the connection before the fake hangup
generated by the replay failure is processed.
2019-07-04 08:21:16 +03:00
f36b6492ab Update current DCB for hangup events
When fake hangup events are delivered via DCBs, the current DCB would not
be updated. This would cause error messages without a session ID which
makes failure analysis harder.
2019-07-04 08:21:16 +03:00
2d77a361f2 MXS-2586: Fix users_refresh_time
The default value was not assigned on startup.
2019-07-03 11:15:21 +03:00
a3bbba0a3d Update REST API ETag documentation
The ETag docuemntation did not mention what sort of changes triggered ETag
updates.
2019-07-03 10:25:30 +03:00
5ff52600c9 Merge branch '2.3.9' into 2.3 2019-07-03 09:31:42 +03:00
66d6ce6fa5 Create /var/lib/maxscale via systemd
Systemd provides the facilities to run commands before startup which can
be used to prevent the problem that fixing MXS-2578 caused: upon upgrading
from 2.3.8 to 2.3.9 the /var/lib/maxscale directory would be removed if it
was empty.
2019-07-03 09:04:46 +03:00
26ca7a98f8 Merge branch '2.2' into 2.3.9 2019-07-02 13:05:23 +03:00
8d91e8e234 Install TCL from the source code only when the system version of the library is older than 8.6.5 2019-07-02 13:03:59 +03:00
1c1b791ddc Merge branch '2.3.9' into 2.3 2019-07-02 10:35:51 +03:00
85bb54ce66 Add missing documentation link 2019-07-02 10:31:38 +03:00
5a6e2f43cf Merge branch '2.2' into 2.3.9 2019-07-02 10:06:33 +03:00
29c530fdcc Update maintenance version of 2.3 2019-07-02 08:56:50 +03:00
cc1bd3db80 Add release notes and update changelog for 2.3.9 2019-07-02 08:54:55 +03:00
8ee54b76d6 Merge branch '2.2' into 2.3 2019-07-02 08:36:37 +03:00
493ce86d87 Add release notes and update changelog for 2.3.9 2019-07-02 08:23:43 +03:00
6b11067690 Lower throttling limit in mxs173_throttle_filter
The test appears to fail when the throttling is unable to keep the QPS
high enough for the test to pass. To reduce the likelihood of this, lower
the limit to 500 QPS.

In theory, the minimum delay of one millisecond in the delayed_call limits
the filter to a maximum QPS of 1000 as each query would wait for at least
a millisecond before being routed. This is yet to be proven but it would
explain why the tests are having a hard time approaching that level of
QPS.
2019-07-01 17:30:03 +03:00
25d134df9c Too slow a system isn't a test failure
If testing cannot be reliably performed, the test should be skipped to
minimize unnecessary work that non-deterministic failures cause.
2019-07-01 17:18:22 +03:00
b3eb5ccc81 Fix run_ctrl_c.sh on newer systems
Systems that no longer support SysV init scripts and the service command
need to use systemctl.
2019-07-01 17:13:09 +03:00
0b18826fc1 Fix no_password
The test used freed memory.
2019-07-01 16:57:52 +03:00
418a1f5210 MXS-2584: Assert that workers are initialized
The initialization must always be done before a call to RoutingWorker::get
is done.
2019-07-01 16:37:55 +03:00