9a0445cd4e
MXS-1845 Save cycle members
...
The saved data may be useful later on. Also includes some cleanup.
2018-06-05 16:25:04 +03:00
37841183b3
Cleanup server.h
...
Renamed, rearranged and clarified status bits. Removed unused macros.
2018-06-01 14:29:51 +03:00
4d7aff4ab9
MXS-1845 Find strongly connected components with multiple slave connections
...
Rewrote the algorithm for clarity.
2018-06-01 14:04:50 +03:00
a82c5911e5
MXS-1775 Rename m_monitor_base to m_monitor
...
To make it compatible with how the variable is named
in maxscale::MonitorInstance.
2018-06-01 13:48:15 +03:00
f8940d4a2a
Use 64bits for server status flags
...
Monitor journal still uses 32bits.
2018-05-23 16:19:08 +03:00
3ec449339f
Only write to SERVER->status at the end of a monitoring loop
...
This makes the code clearer and reduces race conditions, as the monitor
could be writing SERVER->status while a router is reading it. Also,
the time during which the SERVER struct is locked drops to a fraction.
2018-05-23 16:19:08 +03:00
b29bae6e84
MXS-1865 Update server version only when (re)connecting
...
Updating it every iteration is needless.
2018-05-16 13:55:45 +03:00
b92284afc4
Move server querying to MariaDBServer
...
The query functions still require the base monitor struct because of
mon_ping_or_connect_to_db().
2018-05-14 11:11:08 +03:00
10b2b4ac37
MXS-1703 Use monitor-specific array instead of linked list
...
Also starting cleanup of server specific monitor code.
2018-05-07 13:51:27 +03:00
b44f2cfa36
Remove SERVER->slaves field
...
The field was only used by MariaDB-Monitor. A later commit will add equivalent
information to the monitor diagnostics function.
2018-05-07 13:51:06 +03:00
5d010ff712
Cleanup SERVER struct
...
Removed one unused field. Rearranged others, clarified comments.
2018-04-27 10:48:56 +03:00
de1e299f3f
MXS-1745 Save all rows from SHOW ALL SLAVES STATUS
...
The master down verification through slaves won't work with this commit. It needs to be
redesigned to handle multiple slave connections or removed. Also, only the first row of
slave status data is used by the monitor, so multiple slave connections are still
incorrectly handled.
2018-04-27 10:48:45 +03:00
7c933df56f
MXS-1703 Remove support for MariaDB/MySQL versions less than 5.5
...
5.1 to 5.3 are officially not supported anymore, so support can be removed from
the monitor. This allows removing the config parameter "mysql51_replication".
2018-04-26 10:47:57 +03:00
8e3bec5d09
MXS-1703 Rename fields in SlaveStatus
...
Althought the fields are still public, having the 'm_' is clearer.
2018-04-26 10:47:57 +03:00
02c57c98e4
MXS-1703 Move more methods to MariaDBServer
...
These methods only modify or update a single server.
2018-04-18 10:27:16 +03:00
c43f64c87e
MXS-1703 Cleanup more methods
...
Most monitor functions now work with the monitor's own server class.
2018-04-16 13:48:56 +03:00
3c8d3feff9
MXS-1703 Run astyle, rewrite comments & reorder fields
...
No functional changes.
2018-04-13 13:33:13 +03:00
f7cc2aed5a
MXS-1703 Remove MariaDBServer value array type
...
Having two types of arrays was more trouble than worth. Clearer to just
use the array of pointers. Renamed ServerRefArray to ServerArray.
2018-04-13 10:08:57 +03:00
9fe57bfb9b
MXS-1703 Change type of m_master to MariaDBServer
2018-04-13 10:08:57 +03:00
b6e421e13b
MXS-1703 Use a common header for all mariadbmon files
...
The mariadb_common.hh file is now a header with only common definitions
such as module name. The QueryResult-class was moved to MariaDBServer.
2018-04-12 13:06:36 +03:00
ca9682f042
MXS-1703 Reorganize cluster manipulation methods
...
Just moving code around.
2018-04-12 13:06:36 +03:00
71004a0ebc
MXS-1703 Rearrange functions
...
Some functions were moved to class methods, others were moved to a different file.
All MariaDBMonitor fields are now private. Cleaned header a bit.
2018-04-09 10:54:34 +03:00
e43678bed9
MXS-1744 Take new Gtid-class into use
...
Also cleaned up mariadbserver a bit.
2018-04-06 10:16:29 +03:00
923de851f9
MXS-1703 Move more functions to MariaDBServer
...
Also, the QueryResult integer reading method now only reads non-negative integers
since the server rarely returns negative values. This frees negative values for
indicating parsing error(s).
Gtid-class was moved back to utility.hh/.cc because the QueryResult-class requires it.
2018-03-28 13:47:07 +03:00
f7ea12b8e4
Merge branch '2.2' into develop
2018-03-28 13:24:54 +03:00
1d5128fc5b
MXS-1703 Move do_show_slave_status() to MariaDBServer
...
Also took into use the QueryResult helper class.
2018-03-27 12:43:36 +03:00
a350de1275
MXS-1703 Move MariaDBServer to its own file
...
generate_master_gtid_wait_cmd() is now a method of the Gtid-class.
2018-03-23 13:13:01 +02:00
0b5601a6c8
MXS-1703 Rename MySqlServerInfo, prepare to use it as the primary class
...
Renamed to MariaDBServer. The objects have a pointer to the underlying
MXS_MONITORED_SERVER. The purpose is to have the monitor mainly use
MariaDBServer instead of the current mix of MXS_MONITORED_SERVER* and
MySqlServerInfo and to simplify the mapping between the two. Also,
many methods can be moved to the MariaDBServer class later on.
Some functions have been converted from MXS_MONITORED_SERVER* to
MariaDBServer.
2018-03-21 15:35:36 +02:00
1bef791572
MXS-1703 Miscellaneous cleanup
...
1. Move some remaining class data private.
2. Linebreak long lines.
3. Move current master autoselection inside class method.
4. Remove single-use constant #defines.
5. Monitor status is only written inside loop.
2018-03-19 16:08:28 +02:00
4a6fc6b1c8
MXS-1703 Rearrange functions and methods
...
Lots of cleanup, but mostly distributing functions/methods to correct files.
2018-03-16 18:35:17 +02:00
2be576da31
MXS-1703 Fix refactoring error in get_replication_tree()
...
Refactoring and removing explicit class pointer caused a local variable
to mix with a class field. This fix renames the local variable.
2018-03-16 14:31:40 +02:00
d32db326e4
MXS-1703 Manual switchover, failover, rejoin to class methods
...
This allows privatising several public methods. Also, cleaned up
monitor start and stop a bit.
2018-03-15 13:45:14 +02:00
51188123c8
MXS-1703 Move cluster dicovery code to a separate file
...
Attempting to break the large main file to smaller chuncks.
2018-03-14 17:52:15 +02:00