4637 Commits

Author SHA1 Message Date
Markus Mäkelä
bbeaaa97b5
Merge branch '2.2' into develop 2018-06-13 23:18:52 +03:00
Markus Mäkelä
315738f279
Merge branch '2.1' into 2.2 2018-06-13 23:15:11 +03:00
Markus Mäkelä
53177c30de
Fix runtime listener creation
The number of arguments to createListener was incremented but the maximum
count was not. Also fixed the parameter types for createListener and
alterServer.
2018-06-13 23:13:16 +03:00
Markus Mäkelä
143882ddce
Merge branch '2.1' into 2.2 2018-06-13 21:04:49 +03:00
Marko
f6e01b4434 MXS-591 Fix documentation and change comment parameter type 2018-06-13 20:44:32 +03:00
Esa Korhonen
5324a1bdaa MXS-1845 Assign server roles
Assign server roles (master, slave, relay master, slave of external master)
for a graph with possibly multiple paths to a slave server.
2018-06-13 17:38:53 +03:00
Esa Korhonen
3f82c25c62 MXS-1845 New algorithm for finding the master server
Not yet used, as more is needed to replace the old code. The
algorithm is based on counting the total number of slave nodes
a server has, possibly in multiple layers and/or cycles.
2018-06-13 17:38:33 +03:00
Markus Mäkelä
1ea7c65861
Fix runtime alteration of servers
The server runtime alteration was broken by commit
c850336199c3c19508a3d280fb7000291d66b80c when it increased the maximum
argument count of the `alter server` command to 14.
2018-06-13 14:29:28 +03:00
Markus Mäkelä
8094c67ac2
Merge branch '2.2' into develop 2018-06-13 00:25:56 +03:00
Markus Mäkelä
e99d9826ad
Fix route_by_statement return value
The return value of route_by_statement was not initialized and not set if
a COM_CHANGE_USER was processed.
2018-06-12 23:55:30 +03:00
Markus Mäkelä
0627e8dc86
Resolve all symbols for routers at link time
The routers should not have undefied references. Exceptions to this are
the modules that use the maxscale_shutdown() function defined in
gateway.cc.
2018-06-12 19:40:34 +03:00
Markus Mäkelä
1946cb2876
Take a lambda function into use in readwritesplit
To test whether the compiler conforms to C++11, we can try to use a lambda
function.
2018-06-12 19:40:34 +03:00
Marko
de1f95028b MXS-591 Add filter for injecting comments
Comments specified in the cnf file will be injected as a comment before
every sql statement.
2018-06-12 15:31:18 +03:00
Johan Wikman
69b19d1473 Remove unnecessary includes of hashtable.h
And add where necessary.
2018-06-12 11:02:29 +03:00
dapeng huang
cd136b11a7 MXS-1891: dealloc named prepare should route to all (#174)
* dealloc named prepare route to all

* add newline

* erase from ps manager too

* little refactor
2018-06-12 10:45:11 +03:00
Markus Mäkelä
96ed651466
Merge branch '2.2' into develop 2018-06-11 11:28:36 +03:00
Markus Mäkelä
1a24f0a956
Merge branch '2.1' into 2.2 2018-06-11 10:36:57 +03:00
Markus Mäkelä
c798a4ae36
Remove use of HASHTABLE in galeramon
Replaced the HASHTABLE in galeramon with an std::unordered_map. This
simplifies the code by a great amount and makes it more readable. Removed
the extraneous functions that mostly logged debug information and
simplified the logic by removing redundant checks.
2018-06-11 10:22:23 +03:00
Markus Mäkelä
9263a06b15
Fix galera master selection
The master selection still used the current status instead of the pending
status. This caused the master selection to lag behind by one monitor
loop.
2018-06-11 10:22:23 +03:00
Markus Mäkelä
1e1734f42e
MXS-1910: Only require ssl_ca_cert for servers
Servers in MaxScale can encrypt the connections without client keys and
certificates. As keys and certificates are no longer required, the CA
certificate must always be initialized.
2018-06-09 00:15:48 +03:00
Markus Mäkelä
dd49d4faea
Check pending Synced status in Galeramon
The pending status must be used, not the current.
2018-06-08 14:41:11 +03:00
Markus Mäkelä
9f5358eac0
Remove server_get_parameter_nolock
The function is no longer needed as there is no recursive access to the
server.
2018-06-08 14:41:11 +03:00
Markus Mäkelä
8c22131827
Remove redundant or unused avrorouter code
The code in avrorouter that returned the current transaction was not very
useful and it can be acquired via the REST API in a more convenient
format.

The number of created sessions is tracked on the service level so there is
no need to track it in the avrorouter.

Removed declarations for functions that do not exist and moved code around
to reduce the scope.
2018-06-08 12:18:14 +03:00
Markus Mäkelä
47d84cab81
Fix annotate_rows and binlog name processing
The four extra bytes added by the binlog checksums weren't ignored. This
caused the info messages to display the binary data of the checksum.
2018-06-08 12:18:14 +03:00
Markus Mäkelä
7c18696608
Abstract all row event processing
The code that handles the Avro files is now fully abstracted behind the
AvroConverter class that implements the RowEventHandler interface.

The code still has some avro specific behavior in a few places (parsing of
JSON files into TableCreate objects). This can be replaced, if needed, by
querying the master server for the CREATE TABLE statements.
2018-06-08 12:18:14 +03:00
Markus Mäkelä
d094e93209
Rename conflicting objects
The START_ENCRYPTION_EVENT is the name of an object that is exposed by the
Connector-C.
2018-06-08 12:18:13 +03:00
Markus Mäkelä
5268d032c5
Process file and data events separately
The various file operation related binlog events are now processed on the
upper level. This makes the actual data event processing simpler and
easier to comprehend.
2018-06-08 12:18:13 +03:00
Markus Mäkelä
9ec6293e3f
Implement avrorouter in a separate file
The module implementation is now contained in one file. This makes it
easier to see which parts depend on each other.
2018-06-08 12:18:13 +03:00
Markus Mäkelä
b3cc65c516
Add missing binlog_checksum initialization
The variable was not initialized.
2018-06-08 12:18:13 +03:00
Markus Mäkelä
04c781f4d5
Remove unused struct
The BINLOG_EVENT_DESC struct wasn't used.
2018-06-08 12:18:12 +03:00
Markus Mäkelä
1786fb59bb
Reorganize avrorouter event processing
Reorganized and cleaned up the binlog event processing code. Moved some of
the sanity checks into subfunctions and placed file related checks into a
separate section.
2018-06-08 12:18:12 +03:00
Markus Mäkelä
8fab725413
MXS-1881: Move RBR objects into a separate header
The RBR event handling related objects are now all in the rpl_events.hh
header. The intention is to combine all replication processing related
events used in the binlogrouter and avrorouter into this header to make
them reusable.

Also fixed the TableCreateEvent constructor to use an rvalue instead of
stealing an lvalue.
2018-06-08 12:18:12 +03:00
Markus Mäkelä
f574703f8e
MXS-1881: Abstract the final event processing
The final part of the row event processing is now done by an
implementation of the EventConverter class. This makes the implementation
of different storage types easier as only the actual storage operation
needs to be implemented.
2018-06-08 12:18:12 +03:00
Markus Mäkelä
c56b2063aa
MXS-1881: Rename event processing related objects
The main objects involved in replication event processing now use camel
case.
2018-06-08 12:18:11 +03:00
Markus Mäkelä
69855f9214
MXS-1881: Refactor AVRO_TABLE
Moved initialization into the constructor and removed unused member
variables.
2018-06-08 12:18:11 +03:00
Markus Mäkelä
f61c56228c
MXS-1881: Refactor TABLE_MAP initialization
Changed TABLE_MAP to use STL containers and types. The initialization is
now done in the constructor. Removed unnecessary linkage between TABLE_MAP
and TABLE_CREATE.
2018-06-08 12:18:11 +03:00
Markus Mäkelä
e35d9dfc10
Move client functionality into AvroSession
Most of the code is unchanged. Some of the code that relied on modifiable
char pointers was modified to use std::string.
2018-06-08 12:18:11 +03:00
Markus Mäkelä
0d73530ff3
Merge branch '2.2' into develop 2018-06-08 11:30:55 +03:00
Markus Mäkelä
a7dd2127d6
Merge branch '2.1' into 2.2 2018-06-08 11:21:35 +03:00
Markus Mäkelä
c850336199
MXS-1907: Allow ssl_verify_peer_certificate when creating listener
When a listener is created at runtime or SSL is being enabled for an
already created listener, the ssl_verify_peer_certificate parameter can
now be defined.
2018-06-08 10:11:43 +03:00
Markus Mäkelä
6ba423cf94
Dump statements on unexpected internal state
If a server responds when no response was expected, dump stored
statements. This should help deduce root causes of problems relating to
unexpected responses.
2018-06-08 07:45:18 +03:00
Johan Wikman
8afa8c2c5a MXS-1775 Add MonitorInstanceSimple class
MonitorInstanceSimple is intended for simple monitors that
probe servers in a straightforward fashion. More complex monitors
can be derived directly from MonitorInstance.
2018-06-07 15:13:26 +03:00
Marko
880db1353a Merge branch '2.2' into develop 2018-06-07 14:39:16 +03:00
Marko
0dd7448586 MXS-1709 Fix memory leaks in unit tests 2018-06-06 22:59:52 +03:00
Esa Korhonen
2481de260f Move monitor-dependent code in MariaDBServer to MariaDBMonitor
Removes Monitor-dependency from the MariaDBServer-class.
2018-06-06 22:28:38 +03:00
Johan Wikman
b2a190c2b8 MXS-1775 Add switchover_on_low_disk_space parameter 2018-06-06 15:25:57 +03:00
Johan Wikman
dc47835ef6 MXS-1775 Add documentation for new monitor parameter 2018-06-06 15:25:57 +03:00
Johan Wikman
af717426d5 MXS-1775 Load server journal unconditionally
The server journal is unconditionally loaded and need not be
done in @c pre_loop.
2018-06-06 15:25:57 +03:00
Johan Wikman
f600b3a769 MXS-1775 Check disk space in MariaDBMonitor 2018-06-06 15:25:57 +03:00
Johan Wikman
18ece193bb MXS-1775 MariaDBMonitor::main() removed
Now uses MonitorInstance::main() as all other monitors.
2018-06-06 15:25:57 +03:00