Commit Graph

12682 Commits

Author SHA1 Message Date
f54d015267 Update 2.3 maintenance version 2019-01-21 13:43:53 +02:00
d350589ce1 Update 2.3.3 release date 2019-01-21 13:43:53 +02:00
5b7c63fef7 Fix quoted value skipping
The return value wasn't checked and the code assumed that a non-end
iterator was always returned.
2019-01-21 13:43:53 +02:00
9542641dae Fix buffer overrun on non-terminated comment
Also made the behavior consistent when an incomplete comment is found.
2019-01-21 13:43:53 +02:00
b4de91e02e Update 2.3.3 release date 2019-01-21 13:28:30 +02:00
7f978f275f MXS-2223 Log a message when a slave is discriminated due to replication lag
Both the replication lag and the message printing state are saved in SERVER,
although the values are mostly used by readwritesplit. A log message is printed
both when a server goes over the limit and when it comes back below.
Because of concurrency issues, a message may be printed multiple times before
different threads detect the new message state.

Documentation updated to explain the change.
2019-01-21 13:02:18 +02:00
28644e9626 Fix quoted value skipping
The return value wasn't checked and the code assumed that a non-end
iterator was always returned.
2019-01-18 10:25:12 +02:00
2e95812b71 Fix buffer overrun on non-terminated comment
Also made the behavior consistent when an incomplete comment is found.
2019-01-18 10:24:59 +02:00
dd16a09342 MXS-2271 Move some initializers out of monitor_create() 2019-01-17 18:24:28 +02:00
40f58ddec8 MXS-2271 Use std::mutex instead of pthread_mutex 2019-01-17 17:51:39 +02:00
3125d1babf MXS-2271 Convert MXS_MONITOR and MXS_MONITORED_SERVER to classes
First step in monitor refactoring and cleanup.
2019-01-17 17:43:54 +02:00
3b55893a20 Combine maxscale/buffer.h with maxscale/buffer.hh 2019-01-17 12:37:40 +02:00
5d959a30ac Merge branch '2.3' into develop 2019-01-17 11:11:38 +02:00
ac61e205d8 MXS-2219 Dynamically create Clustrix servers
MaxScale server objects are now created for all Clustrix nodes.
Currently the name is "Clustrix-Server-N" where N is the number
of the node.

The server is created using runtime_create_server() that has been
modified so that it optionally will not persist the created server.
That is probably just a temporary solution as a monitor should not
need to include .../core/internal-stuff.
2019-01-17 11:11:21 +02:00
bd2eb3d5dc MXS-2219 Allow starting Clx monitor with no servers 2019-01-17 11:11:21 +02:00
640bf40eed MXS-2219 Make a non-URL async HTTP request READY
An asynchronous HTTP request for 0 URLs is immediately
in READY state.
2019-01-17 11:11:21 +02:00
89c059411d MXS-2219 Add health check threshold
Make it configurable how many times a node may fail to respond
on the health check port before it is considered to be down.
2019-01-17 11:11:21 +02:00
880842e55d MXS-2219 Perform cluster monitoring as well
Now the monitor
- will frequently ping the health port of each server
- less frequently check from system.membership the actual
  number of available nodes
and act accordingly.

Currently, the updated servers are the ones listed in the conf
file. Subsequently this will be changed so that the servers listed
in the configuration file are only used for bootstrapping the monitor
and server objects are then created dynamically according to what is
found in the cluster.
2019-01-17 11:11:21 +02:00
f7d97825fb MXS-2219 Add monitor_stash_current_status
The functions stores the current server status to the monitored
server's mon_prev_status and pending_status fields.

To be used at the start of the monitor loop, before the pending
status fields are updated.
2019-01-17 11:11:21 +02:00
7f6f5191cc MXS-2219 Update documentation
The clustrix monitor user must have SELECT grant on
- system.membership
- system.nodeinfo
2019-01-17 11:11:21 +02:00
994b76ff79 MXS-2219 Provide STL iterator for MXS_MONITORED_SERVER 2019-01-17 11:11:21 +02:00
a9fd9c92e2 MXS-2219 Add iterator adapter
Iterator adapter for making it possible to iterate over an
intrusive singly linked list in an STL fashion.
2019-01-17 11:11:21 +02:00
0dfdff1f95 Update 2.3.3 release notes and change log 2019-01-17 11:11:04 +02:00
95f6786b3c Update 2.3.3 release notes and change log 2019-01-17 11:02:12 +02:00
ebbb8a771c Merge branch '2.3' into develop 2019-01-17 10:55:27 +02:00
92b50196ed Merge branch '2.3.3' into 2.3 2019-01-17 10:49:37 +02:00
a469ef83b6 MXS-2217: Pick DCB owner before adding to epoll
There is a race condition between the addition of the DCB into epoll and
the execution of the event that initiates the protocol pointer for the DCB
and sends the handshake to the client. If a hangup event would occur
before the handshake would be sent, it would be possible that the DCB
would get freed before the code that sends the handshake is executed.

By picking the worker who owns the DCB before the DCB is placed into the
owner's epoll instance, we make sure no events arrive on the DCB while the
control is transferred from the accepting worker to the owning
worker.
2019-01-17 10:35:49 +02:00
a3fa2f8111 Merge branch '2.3' into develop 2019-01-16 16:31:14 +02:00
ba393dbfb2 Merge branch '2.3.3' into 2.3 2019-01-16 16:23:56 +02:00
519cd7d889 Don't call python3 directly
Calling it directly from the script adds a dependency on it and we don't
what that.
2019-01-16 16:19:35 +02:00
68d33a3ae4 MXS-2266: Add test case
Extended the existing tests to cover MXS-2266.
2019-01-16 16:19:35 +02:00
317166540f MXS-2266: Close prepared statements with internal ID
The ID used to store the prepared statements uses the internal ID and
using the external ID caused unwanted memory use and a false warning.
2019-01-16 16:19:35 +02:00
39dc83f13c Don't call python3 directly
Calling it directly from the script adds a dependency on it and we don't
what that.
2019-01-16 16:00:32 +02:00
1e1836354b MXS-2257: Extend password encryption tutorial
Fixed the documentation on the arguments to maxkeys, which is a directory,
and added a short paragraph about alternative key file locations. Also
documented that keys are read from the directory where the `datadir`
parameter points to.
2019-01-16 13:33:14 +02:00
7181ea4083 MXS-2266: Add test case
Extended the existing tests to cover MXS-2266.
2019-01-16 12:22:06 +02:00
ba40916d4a MXS-2266: Close prepared statements with internal ID
The ID used to store the prepared statements uses the internal ID and
using the external ID caused unwanted memory use and a false warning.
2019-01-16 12:22:06 +02:00
f5f6a12484 Start Galera correctly
The Galera documentation tells us to use the galera_new_cluster command to
start a new Galera cluster. This should prevent the problems of nodes
failing to join the cluster either on the initial startup or after a node
goes down.
2019-01-16 10:01:58 +02:00
511f01a28d MXS-2252: Add test case
Added a test case that verifies the correct user is used.
2019-01-16 09:43:50 +02:00
db98ecbaa1 MXS-2259: Fix double addition of DCBs to worker list
When poll_add_dcb was called for a DCB that once was polling system but
was subsequently removed, the DCB would appear twice in the worker's list
of DCBs. This caused a hang when the DCB was the last one in the worker's
list and dcb_foreach_local would be called.

To prevent the aforementioned problem, the DCBs are now added and removed
directly to and from the workers instead of indirectly via poll_add_dcb
and poll_remove_dcb.
2019-01-16 09:43:50 +02:00
57fe5ff56a Fix error packet stringification function
The code read past the stack buffer.
2019-01-16 09:43:49 +02:00
021d48f94c Log low-level reason and idle time on master failure
If the connection to the master is lost, knowing what type of an error
caused the call to handleError helps deduce what was the real reason for
it. Logging the idle time of the connection helps detect when the
wait_timeout of a connection is exceeded.
2019-01-16 09:43:49 +02:00
9def07ab4a Document connection_timeout behavior
The fact that a warning is logged was not documented.
2019-01-15 18:42:20 +02:00
d4674faa7d Convert maxscale/query_classifier.h to .hh
The header was not merged with queryclassifier.hh since the latter
does not include the former.
2019-01-15 18:18:39 +02:00
45bfbbdd9e Convert maxscale/protocol.h to .hh 2019-01-15 17:26:26 +02:00
b0663f0b29 Convert maxscale/ssl.h to .hh 2019-01-15 17:12:32 +02:00
6a23015b64 Convert avro headers to .hh
Required for converting maxscale/buffer.h.
2019-01-15 16:38:10 +02:00
dae99b2acd Merge branch '2.3' into develop 2019-01-15 15:57:06 +02:00
8cef8b9472 Compile MariaDBMonitor unit tests only if flag is set 2019-01-15 15:44:21 +02:00
fb2a44f62d Fix filter template documentation
Filter options are no longer used.
2019-01-15 14:10:55 +02:00
f38ee85d5b Allocate match_data only when necessary
If the session doesn't match the required username or remote address, the
match data is not allocated. This also doubles as a replacement of the
active member variable.
2019-01-15 14:10:55 +02:00