167 Commits

Author SHA1 Message Date
Markus Makela
fdd5a10478 Fixed a memory leak in all the monitors when a failed mysql_ping to the database caused a reinitialization of MYSQL* connection. 2015-05-07 11:42:14 +03:00
counterpoint
9d9ebc5f67 Correct date in revision history, add to revision history for disableMasterRoleSetting. 2015-05-05 11:07:23 +01:00
counterpoint
8647b30184 Merge remote-tracking branch 'origin/develop' into MXS-105
Conflicts (resolved):
	server/modules/routing/schemarouter/schemarouter.c
2015-05-05 10:54:09 +01:00
Markus Makela
6c904b164a Fix to bug MXS-25
A failed master no longer generates the "Info: A Master Server is now available" message.
2015-04-30 11:28:07 +03:00
MassimilianoPinto
1755706ada Master/Slave detection based on variable only
Master/Slave role setting is now based on variable value only.

Replication is checked and, if working, master_id, slave_id are saved
into server struct
2015-04-29 10:50:32 +02:00
counterpoint
03badb9b7b Modifications to galera monitor to control whether selection of master is wanted. 2015-04-24 15:35:10 +01:00
Guillaume Lefranc
060ebc3880 Add support for Galera xtrabackup donor availability 2015-04-20 14:45:03 +02:00
Markus Makela
90875c1164 Cleaned up unused variables. 2015-03-11 18:12:18 +02:00
Markus Makela
63d83cd85d Monitor API 2.0.0 implemented. 2015-03-11 15:18:55 +02:00
Markus Makela
9209c812ba Updates to refactoring of the monitors. 2015-03-11 10:40:53 +02:00
Markus Makela
c0d2a12990 First step to refactoring monitors. 2015-03-10 12:24:23 +02:00
Markus Makela
880adca73e Merge branch 'develop' into MAX-324 2015-03-05 10:45:48 +02:00
Markus Makela
2b8cb8aa94 Lowered the CMake required version for non-package builds. 2015-03-04 17:04:43 +02:00
Markus Makela
b4fa4cc1c1 Added MM monitor to the set of modules that are built. 2015-02-24 16:22:34 +02:00
Markus Makela
70f0f239a5 Added dcb_call_foreach to galera monitor and fixed MM monitor missing a parameter. 2015-02-24 15:38:33 +02:00
Markus Makela
9e7afeb302 Merge branch 'develop' into MAX-324
Conflicts:
	macros.cmake
	server/core/config.c
	server/core/service.c
	server/modules/routing/CMakeLists.txt
2015-02-24 06:26:55 +02:00
MassimilianoPinto
0e1bcde5de Fixed compile errors for mm_mon.c
Fixed compile errors for mm_mon.c
2015-02-23 18:58:00 +01:00
Markus Makela
cd986cba17 Updated galera monitor to use the new dcb_callforeach. 2015-02-20 10:18:24 +02:00
Markus Makela
ea55572ab8 Merge branch 'develop' into MAX-324 2015-02-20 04:45:48 +02:00
Markus Makela
da029140cd dcb_call_foreach now only calls the callbacks for those DCBs that are connected to the server. 2015-02-18 05:36:39 +02:00
Markus Makela
9681b9cec4 Added error handling and re-mapping of databases to dbshard router in addition to hint detection. 2015-02-02 21:37:04 +02:00
Markus Makela
566831c9c5 Fix to bug 705: http://bugs.mariadb.com/show_bug.cgi?id=705
changed " to ' in queries so that ANSI_QUOTES works with sql_modes that use it.
2015-01-26 20:17:20 +02:00
MassimilianoPinto
92ebfb2eb9 Timeouts handling in NDB Monitor
Timeouts handling in NDB Monitor
2015-01-26 11:50:24 +01:00
MassimilianoPinto
ba5cab0af6 NDB Monitor update
NDB Monitor update
2015-01-26 11:35:21 +01:00
Timofey Turenko
06c2d201e0 remove makefiles and other garbage 2015-01-14 19:08:24 +02:00
Markus Makela
cd99849581 Fix #2 to bug 680: http://bugs.mariadb.com/show_bug.cgi?id=680"
When no users are loaded from backends, instead of counting it as a failure the service is started and the next time a client connects an attempt to load the users from the backends is made.
2015-01-05 17:38:45 +02:00
Markus Makela
6adccb3c17 Fix to bug 680: http://bugs.mariadb.com/show_bug.cgi?id=680
service.h:Added the 'serviceStartFailed' function which tries to start services with successfully started routers but no successfully started listeners.
mysql_mon.c:Added a call to ServiceStartFailed when servers come available.
2015-01-05 13:38:39 +02:00
VilhoRaatikka
51315c0764 Fixed a memory leak in tee.c:freeSession, where tee session wasn't freed 2014-12-23 13:36:05 +02:00
VilhoRaatikka
f0d8ed0cf2 Fix to #657, http://bugs.mariadb.com/show_bug.cgi?id=657
session.c:session_free:if session is child of another service (tee in this case), it is the parent which releases child's allocated memory back to the system. This now also includes the child router session.
dcb.h: Added DCB_IS_CLONE macro
tee.c:freeSession:if parent session triggered closing of tee, then child session may not be closed yet. In that case free the child session first and only then free child router session and release child session's memory back to system.
tee.c:routeQuery: only route if child session is ready for routing. Log if session is not ready for routing and set tee session inactive
mysql_client.c:gw_client_close:if DCB is cloned one don't close the protocol because they it is shared with the original DCB.
2014-12-23 00:26:57 +02:00
VilhoRaatikka
6b6ac2f95f Partial fix to bug #657, http://bugs.mariadb.com/show_bug.cgi?id=657
dcb.c:dcb_clone: set same close function than in the original DCB so that routing session will become closed when client DCB is closed.
session.h:introduce a new state which indicates that SESSION structure can be freed next, SESSION_STATE_TO_BE_FREED. State is needed to separate the state before and after memory free. Memory is freed in different situation depending on whether the session is parent or child session. Child sessions are freed in their parent.
Also introduce a new member in SESSION struct, ses_is_child, to indicate whether SESSION has a parent session which is responsible for releasing the memory of it.

session.c:session_unlink_dcb:when last session reference is removed set SESSION->state=SESSION_STATE_TO_BE_FREED
session.c:session_free:only free the memory if session is not child session. If it is child, session is left to be freed by the parent (in tee filter's freeSession, for example).

tee.c:newSession:mark branch session to child.
tee.c:freeSession:if child session memory is ready to be freed, free it.

mysql_mon.c:monitorMain:when backend server's status changes so that it is not running anymore or doesn't have any of the states - master, slave, ndb, joined - call for each DCB the callback-function DCB_REASON_NOT_RESPONDING if specified. Earlier callbacks were called if there was any change in the state of the server being monitored.
2014-12-22 16:24:07 +02:00
VilhoRaatikka
ac97fcd764 Removed redundancy from error and message logs.
server.c: Added new member to SERVER->master_err_is_logged. It is used if server loses master status. It causes error log print in readwritesplit router's eror handling. Initial value is false and it is set always to false when server's status is set to master.
Added message log printing to mysql monitor, if master status changes to something else. It is not warning or error but only information which probably interests the user.

readwritesplit.c:Muted warnings and error printings in cases if slaves are not found if it is allowed to have a master only.
readwritesplit.c:Corrected error log printing in case where master lost its status. REdundant prints are removed.
2014-12-18 19:12:01 +02:00
VilhoRaatikka
6a54d888de Merge branch 'release-1.0GA' of https://github.com/mariadb-corporation/MaxScale into release-1.0GA 2014-12-08 16:04:27 +02:00
VilhoRaatikka
5264a1abc9 Added function documentation, moved one non-error log entry to message log, cleaned up a bit. 2014-12-08 16:02:16 +02:00
Mark Riddoch
8fed527ac9 Merge branch 'release-1.0GA' into blr 2014-12-08 09:21:38 +00:00
Mark Riddoch
ce056dccd8 Update modue status of all GA modules 2014-12-08 09:19:35 +00:00
VilhoRaatikka
b1eaaea961 Merge branch 'release-1.0GA' of https://github.com/mariadb-corporation/MaxScale into release-1.0GA 2014-12-05 23:57:02 +02:00
VilhoRaatikka
01b1b0a304 Fixes to Coverity issues 84388, 84386, 84385
mysql_mon.c: Added back server state logging to Debug build.
query_classifier.cc: removed some extra debug code, cleaned up a bit function documentation.
mysql_client_server_protocol.h, mysql_backend.c, mysql_common.c: changed some variables to signed ones to enable checking of calculations in the code.
skygw_utils.cc: removed erroneous debug assertion.
2014-12-05 23:39:14 +02:00
MassimilianoPinto
c133a42bbd Skip log for "Master available" with MAINTENANCE
Skip logging “A Master Server is now available” message when the server
has SERVER_MAINT bit value
2014-12-04 15:25:04 +01:00
MassimilianoPinto
93876f565d Log message fixed
Log message fixed
2014-11-21 11:57:57 +01:00
MassimilianoPinto
e5b041ea93 Reset log counter for members in the cluster
Reset log counter for members in the cluster
2014-11-21 11:31:01 +01:00
MassimilianoPinto
fc5647282f New logging features for galera mon
New logging features for galera mon
2014-11-20 17:52:27 +01:00
MassimilianoPinto
c62a89f5c8 Fixed typos and added function headers
Fixed typos and added function headers
2014-11-20 17:40:33 +01:00
MassimilianoPinto
1ac4b0bba7 Monitored server status change logged once
Monitored server status change logged once.
Available / not available master is logged
2014-11-20 16:47:17 +01:00
MassimilianoPinto
511d93f266 Monitored server status change logged in debug log
Monitored server status change is now logged in debug log
2014-11-20 12:18:33 +01:00
Markus Makela
a65b9fa8b3 Fixes to Coverity defects: 72662 82143 82144 82145 82348 82349 2014-11-20 06:44:43 +02:00
VilhoRaatikka
bb39267126 Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-11-19 00:15:21 +02:00
VilhoRaatikka
fd11e6a7f5 Session-specific logging. Added functions
void session_enable_log(SESSION* ses, logfile_id_t id)
and
void session_disable_log(SESSION* ses, logfile_id_t id)

Which switch specific log type on/off if the log type in question is not generally enabled.

Each thread carries a thread-specific struct log_info_t which includes members for current session id and bitfield for enabled log types for the current session. That information is checked before actual log write functions are called.

Each file where session-specific logging is used, must include the following exports:

/** Defined in log_manager.cc */
extern int            lm_enabled_logfiles_bitmask;
extern size_t         log_ses_count[];
extern __thread log_info_t tls_log_info;
2014-11-19 00:08:59 +02:00
MassimilianoPinto
fc04087ab4 Valgrind tests completed
Valgrind tests completed, message removed
2014-11-18 13:19:38 +01:00
MassimilianoPinto
91f65072a2 Slave status removed of 1 server only
Slave status removed of 1 server only
2014-11-18 13:07:49 +01:00
MassimilianoPinto
e2fd2c422e One server only in MySQL monitor config
One server only in MySQL monitor: it’s the Master.
Only one server in mysql monitor and in router sections
2014-11-18 11:25:21 +01:00