Commit Graph

8332 Commits

Author SHA1 Message Date
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
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
38879e6d0f Move active PCRE2 data structures into RegexSession
The match_data object should not be used by multiple threads at the same
time as it stores the offsets into the query string for matches.
2019-01-15 14:10:55 +02:00
f9704bda9b Rename regexfilter structures 2019-01-15 14:10:54 +02:00
684ec3288b Rename and cleanup authenticator.h 2019-01-14 15:07:33 +02:00
b4d91d4b9a Move query result helper class to maxsql
Added some asserts to ensure the class is used correctly.
2019-01-14 10:43:17 +02:00
07cbda7771 Merge branch '2.3' into develop 2019-01-11 13:06:16 +02:00
6d296f6661 MXS-2220 Move authenticator instance data to internal class 2019-01-11 11:31:27 +02:00
42215c65fa MXS-2220 Cleanup global server list handling
The list is now an array and only accessed by the owning object to ensure locking.
2019-01-11 11:31:27 +02:00
87913f8cb8 MXS-2220 Miscellaneous cleanup
Removes some duplicate includes.
2019-01-11 11:00:24 +02:00
8ac786110e MXS-2255: Fix COMMIT matching
The code used a rather questionable method for parsing SQL statements
instead of using the query classifier for detecting transaction start and
stop events.
2019-01-11 10:27:00 +02:00
9823fe2651 MXS-2247 Add support for random number generation to maxutils
Classes for xorshift and std random. Add a random number generator to Worker.
2019-01-10 16:51:32 +02:00
7cac2c009d Merge branch '2.3' into develop 2019-01-10 12:43:46 +02:00
9cac927542 MXS-2220 Move server response calculation functions inside class 2019-01-10 10:26:53 +02:00
df17619722 MXS-2220 Move server_update_address inside class
Should be moved to internal class once blr is cleaned up.
2019-01-10 10:26:53 +02:00
46eddc8102 Rename ReadConn to RCR
RCR is more compact and looks neat.
2019-01-10 07:16:42 +02:00
5613f31bc7 Clean up readconnroute
Moved method documentation into the headers and removed the local
variables storing pointers to this.
2019-01-10 07:16:42 +02:00
d6df5a7d6a Use router template in readconnroute 2019-01-10 07:15:45 +02:00
54589424f9 Use more C++ code in readconnroute
Allocations are now done with new and casts are done using
static_cast. Removed revision history and cleaned up some assertions.
2019-01-10 07:12:31 +02:00
b30b743455 Rename readconnroute structures
Renamed them with the C++ coding style in mind.
2019-01-10 07:12:30 +02:00
5da833187c Rename readconnroute header
The name now reflects the module and source code name.
2019-01-10 07:12:30 +02:00
3ffa76b172 Fix maxscale/tasks resource
The returned JSON was simply an array of tasks.
2019-01-10 07:07:41 +02:00
147f0bb656 Extend master failure error message
The error now describes the failure mode in more detail. This should make
post mortem analysis of failed connections a lot easier.
2019-01-09 20:05:38 +02:00
5a698be45c MXS-2218 Centralize worker shutdown handling 2019-01-08 16:01:36 +02:00
29b6e53eb8 MXS-2218 Replace mq housekeeper task with delayed call 2019-01-08 16:01:36 +02:00
e179395819 MXS-2218 Replace housekeeper task with delayed call 2019-01-08 16:01:36 +02:00
c27a24ab37 MXS-2218 If startup fails, main worker must also be shutdown 2019-01-08 16:01:36 +02:00
6ba2cb61df MXS-2218 Implement housekeeper in terms of MainWorker 2019-01-08 16:01:36 +02:00
026bf747e6 MXS-2218 Add functionality for mxs_clock 2019-01-08 16:01:36 +02:00
2d2f62ed6f MXS-2218 Add showing and to_json functionality 2019-01-08 16:01:36 +02:00
d50ae1fb8a MXS-2218 Treat all routing workers the same way
All routing workers are now started an stopped the same way.
2019-01-08 16:01:36 +02:00
35dfa05767 MXS-2218 Run MainWorker in main thread
The previous main routing worker is now run in a separate thread.
Next step is to treat all routing workers in an identical fashion.
MainWorker is not yet used for anything, but in a subsequent change
the old housekeeper functionality will be moved in top of MainWorker.
2019-01-08 16:01:36 +02:00
92306c565b MXS-2218 Add housekeeper functionality to MainWorker
In preparation for moving the housekeeper functionality on top
of MainWorker.
2019-01-08 16:01:36 +02:00
c5a4f2abdd MXS-2218 Add simple housekeeper test
So that the new worker based housekeeper can be tested.
2019-01-08 16:01:36 +02:00
10216524ab MXS-2218 Add skeleton MainWorker
First step in the introduction of a MainWorker. When finished, all
routing workers will run in separate threads (currently one runs in
the main thread), and the main worker run in the main thread.

Housekeeper will disappear and to the extent housekeeping tasks are
needed (where applicable they will be changed into delayed calls)
they will be run by the main worker.
2019-01-08 16:01:36 +02:00
1c647f3753 MXS-2220 Move most remaining functions inside class
Most of the ones still remaining outside are special cases.
Also, removed locking from status manipulation functions as it
has not been required for quite some time.
2019-01-08 15:15:34 +02:00
d5c78eb31f MXS-2220 Move more server functions inside class 2019-01-08 15:12:47 +02:00
8b53e30678 MXS-2220 Move server status functions inside class 2019-01-08 15:12:47 +02:00
49c1afcb1b Merge branch '2.3' into develop 2019-01-08 13:17:27 +02:00
63358fb4c1 Add correct operator to comparison
The clause had a bitwise AND. The end result is likely the same.
2019-01-08 10:18:15 +02:00
93aff0640c MXS-2220 Cleanup server header
Moved items around in preparation for more changes.
2019-01-07 16:10:15 +02:00
03adee2030 MXS-2220 Run uncrustify on server headers 2019-01-07 16:10:15 +02:00
b16ee3a94e MXS-2220 Move server_is_active inside the class 2019-01-07 16:10:15 +02:00
764d9a4e75 MXS-2220 Move monitor user and password fields to internal class
Also changed the lengths of the buffers.
2019-01-07 16:10:15 +02:00
ade66816f1 Fix invalid read
A returned object will be destructed at the next sequence point.
2019-01-07 16:04:47 +02:00
f8545a0b7f MXS-2219 Address review comments 2019-01-07 12:59:57 +02:00
4512295e40 MXS-2219 Implement rudimentary Clustrix monitoring
The monitor now pings the health check ports of the Clustrix nodes.
A response translates to RUNNING and a non-response to DOWN.
2019-01-07 12:59:27 +02:00