Commit Graph

4111 Commits

Author SHA1 Message Date
8ce6a679be Merge branch '2.3' into 2.4 2019-08-09 19:44:46 +03:00
5899556d89 MXS-2592 Enable runtime configuration of session_trace 2019-08-09 19:36:24 +03:00
bf551c5b1e Merge branch '2.3' into 2.4 2019-08-09 03:01:00 +03:00
547236b7a4 MXS-2609: Store history size in Backend
When a connection is created, the size of the history that is about to be
replayed is known. Storing this and decrementing it each time a session
command is completed tells us when the Backend has finished replaying the
session command history. This can then be used to distinguish whether a
session command executed on a master should be retried or whether to
simply discard the connection.
2019-08-09 01:54:09 +03:00
d3e199ff1d Use old default parameter definitions in config2.cc
This prevents problems when 2.3 is merged into 2.4 and it contains new
common parameters with defaults.
2019-08-05 15:06:25 +03:00
1514a77345 Improve main thread detection
Now properly checks if configuration and diagnostics functions are ran in either
main() or in the admin worker. This is useful for debugging and enforcing
thread safety.

Also, monitors are now started and stopped in the admin worker.
2019-07-31 12:36:05 +03:00
ed84f29fca MXS-2612 Free routing worker local data
When a RoutingWorker is destructed, all existing local data will
unconditionally be destroyed.

The case in point is the vector<SFilterDef>s that are held as routing
worker local data by the Service. Unless the local data is deleted, the
filter defs will not be deleted at shutdown.

This is somewhat brute-force (but good to have in place nonetheless) as
the deletion of the local data should be done by the Service and before
the routing worker thread has exited.
2019-07-30 13:01:12 +03:00
a9b01ff4cc Merge branch '2.3' into 2.4 2019-07-28 21:43:58 +03:00
918a2964d5 MXS-2592 Add configuration for session specific in-memory log
When enabled each session will write log messages in the in-memory log.
If session ends in error this log is written to the actual log in disk.
2019-07-28 20:56:22 +03:00
d4b712ae84 MXS-2546 Add DNS-resolving to topology detection
When matching hostnames between MaxScale server configuration and the
SHOW SLAVE STATUS-output, use DNS-resolution if a simple string comparison
doesn't find an answer. Results of the resolution are saved to avoid
repeating the operation for the same address.
2019-07-22 11:10:23 +03:00
835049d506 Merge branch '2.3' into 2.4 2019-07-19 12:25:26 +03:00
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
5b3c0b8b81 Merge branch '2.3' into 2.4 2019-07-16 13:17:35 +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
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
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
f9b1a0a0c4 Merge branch '2.3' into 2.4 2019-07-10 08:17:34 +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
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
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
8960d2df8f Merge branch '2.3' into 2.4 2019-07-04 09:39:52 +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
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
3e85500491 Merge branch '2.3' into 2.4 2019-07-02 08:38:15 +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
b2019ea18e Correctly reset PS continuation state
The state was modified only by PS commands.
2019-07-01 10:33:18 +03:00
42c37585f4 Throttle query retry attempts
It was possible that a one-second outage that caused immediate rejection
of network connections would cause all of the query retry attempts to fail
within a very short period of time. By preventing rapid reconnections,
query_retries is more effective as an error filtering mechanism.
2019-06-28 09:27:20 +03:00
fcc19f3c66 Merge branch '2.3' into 2.4 2019-06-27 08:53:33 +03:00
5eba688c1b MXS-2521: Detect COM_STMT_EXECUTE without metadata
If a COM_STMT_EXECUTE has no metadata in it and it has more than one
parameter, it must be routed to the same backend where the previous
COM_STMT_EXECUTE with the same ID was routed to. This prevents MDEV-19811
that is triggered by MaxScale routing the queries to different backends.
2019-06-27 08:29:30 +03:00
ae18e454cc Remove manual revision history from tests 2019-06-25 20:44:15 +03:00
d15582d26d Allow posting to stopped workers
Due to there being no distinction between a temporarily stopped worker and
a permanently stopped one, we must allow posting of messages to stopped
workers.
2019-06-25 17:32:24 +03:00
7d10a71015 Fix broken Change Dates
Were not correct, so were not updated with all others.
2019-06-25 10:11:55 +03:00
0ba779d5a2 Update 2.4.0 Change Date 2019-06-25 10:11:55 +03:00
aac0ecc373 MXS-2574: Add PATCH for /users/inet endpoint
The alteration of user passwords is now done inside MaxScale. This
prevents the possibility of a user locking themselves out.
2019-06-25 08:23:17 +03:00
77671a2393 Also preload mariadbbackendauth
The backend protocols require it.
2019-06-24 22:46:27 +03:00
c1c376b7ac MXS-2575: Fix REST-API error propagation
The errors are now correctly sent even with requests that upload data.
2019-06-24 15:15:47 +03:00
2f56264715 Preload mariadbbackend for unit tests
This should fix the failure of test_config2 and make server allocation
work.
2019-06-24 15:15:47 +03:00
a51e094cd5 Merge branch '2.2' into 2.3 2019-06-24 15:07:18 +03:00
7fb268f1a7 MXS-2575: Fix REST-API error propagation
The errors are now correctly sent even with requests that upload data.
2019-06-24 14:37:40 +03:00
24b575bb93 Print error if child process cannot access monitor script file 2019-06-24 12:22:25 +03:00
1cb13582ff Fix worker state debug assertion
Stopped workers will receive messages.
2019-06-24 11:03:50 +03:00
0b67ce1e82 Merge branch '2.3' into develop 2019-06-20 14:36:48 +03:00
805be70a78 Add more information to rwsplit info messages
The statement ID for all binary protocol statements and the error given to
handleError are now logged.
2019-06-20 14:27:03 +03:00
20f595d978 Merge branch '2.3' into develop 2019-06-20 13:00:13 +03:00
7673ee685d Distinguish stopped and finished workers
By having a separate FINISHED state and a STOPPED state, it is possible to
know at which point in the worker's lifetime an event is done. Posting of
messages before a worker is started is allowed but posting them after the
worker has stopped is not.

This fixes avrorouter related failures and all other failures that stem
from worker messages being ignored at startup.
2019-06-20 12:32:30 +03:00