Commit Graph

375 Commits

Author SHA1 Message Date
000a044da6 Slaves are set to unregistered state once disconnected
It was possible that the same slave was disconnected multiple times
before the slave DCB was closed.
2015-12-10 15:50:20 +02:00
9a3aae64ce Replaced explicit closeSession calls with dcb_close
The closeSession entry point shouldn't be called directly and dcb_close
should be used instead.
2015-12-10 15:50:20 +02:00
49cf4089fc Make state-change logging conditional. 2015-12-10 15:50:20 +02:00
f49bd06a7e Reduce logging of binlog server
Only the true state changes of a slave - up-to-date -> catch-up
or catch-up to up-to-date - are logged.
2015-12-10 15:50:20 +02:00
43c5a495a2 Removed useless spaces
Removed useless spaces
2015-12-10 15:50:20 +02:00
3f31f5548d Addition of slave transition to catchup mode in logging
Addition of slave transition to catchup mode in logging
2015-12-10 15:50:20 +02:00
231a620dc0 Remove >= 0 check from unsigned type. 2015-12-08 14:37:21 +02:00
1deea7f929 Remove unnecessary comparison.
It makes no sense to compare an unsigned integer for non-negativeness;
it won't ever be. router_instance.lastEventReceived is uint8_t.
On centos5 this causes a warning that thus ends the compilation.
2015-12-08 13:28:11 +02:00
7119ed817d Transaction safety default is off in binlog router
Transaction safety default is off in binlog router
2015-12-02 11:18:12 +01:00
1c1d4b205a Merge branch '1.2.1-binlog_router_trx' into develop 2015-12-01 09:37:47 +01:00
6367ac7148 Changed log level for up to date transition
Changed log level for up to date transition
2015-11-30 19:23:36 +01:00
592e4d06cb Changed name for bad fd
Changed name for bad fd
2015-11-30 10:22:47 +01:00
ba135c5548 Log messages fix with slave ip:port and id
Log messages fix with slave ip:port and id
2015-11-30 10:22:12 +01:00
a829b38873 Fix to MXS-363: Added soname versions to libraries
The soname version numbers were missing from all the library targets
properties which caused ldconfig to warn about non-symlink libraries
being installed.
2015-11-30 10:46:08 +02:00
dcf81db395 Merge branch '1.2.1-binlog_router_trx' into develop 2015-11-30 09:40:04 +01:00
14d11fa4c0 Changed name for bad fd
Changed name for bad fd
2015-11-27 09:43:58 +01:00
5a64fc70dc Log messages fix with slave ip:port and id
Log messages fix with slave ip:port and id
2015-11-27 09:16:17 +01:00
dd922a1ff9 Added check for missing service listener
Added check for missing service listener
2015-11-26 17:00:30 +01:00
916ee5ff2a Rename some log concepts
The mxs prefix is now uniformly used with all log components.
2015-11-26 17:34:53 +02:00
e38334c457 Fix locking issue in blr_close_binlog
In blr_open_binlog the refcnt increase of file which is already
open is protected by router->fileslock. In blr_close_binlog the
decrease of the refcnt was protected by file->lock.

This lead to a situation where it was possible that a file was
closed and the file instance freed, even though it just had been
taken into use by somebody else.

This is now fixed by solely using the router->fileslock for protecting
the increase and decrease of the refcnt.
2015-11-26 10:34:34 +02:00
038877b8db Fixed minor format errors and resource leaks
Some format strings used integer values for unsigned integers.
Memory and file descriptors leaked in some error conditions.
2015-11-25 12:43:49 +02:00
dcf0d4ef4b Merge remote-tracking branch 'origin/MXS-472a' into develop 2015-11-25 10:42:52 +00:00
5353353a3a Merge '1.2.1-binlog_router_trx' into develop 2015-11-25 10:53:55 +01:00
68a7f4b472 Merge remote-tracking branch 'origin/develop' into MXS-472a 2015-11-23 10:05:55 +00:00
23b2ce004b Added support for MariaDB 10.1 embedded library
The code used in the query classifier was not compatible with 10.1 version
of MariaDB and needed to be fine tuned in order for it to work with all
supported versions of MariaDB.
2015-11-23 11:41:05 +02:00
c167499c7b Add notice about previous failure to unlock.
In blr_slave.c under certain conditions, two locks were not released.
That was fixed in another change, and with this change a notice will be
logged if that branch is entered. That way it will be possible to find
out whether this may have been the cause of earlier lock-ups.
2015-11-23 09:51:59 +02:00
1b9920ef10 Add notice about previous failure to unlock.
In blr_slave.c under certain conditions, two locks were not released.
That was fixed in another change, and with this change a notice will be
logged if that branch is entered. That way it will be possible to find
out whether this may have been the cause of earlier lock-ups.
2015-11-23 09:25:50 +02:00
99fdf9cdec Fixed reference to LOGIF macro
Fixed reference to LOGIF macro
2015-11-19 17:54:23 +01:00
b7ce68aa1c Added missing source files to maxbinlogcheck
The build files for monitors were referring to monitor_common.c which was
refactored out and combined with monitor.c. Due to this change, maxbinlogcheck
required maxscale_pcre2.c and externcmd.c.
2015-11-19 18:46:39 +02:00
023d4bc588 Develop merge
Develop merge
2015-11-19 17:06:30 +01:00
90d2dc336c Missing lock release added
Missing lock release added and log message update
2015-11-19 08:58:49 +01:00
3f8739ebfd LOGIFs removed from binlog test. 2015-11-18 13:23:16 +02:00
afdeb6fa5b binlogrouter: All LOGIFs and skygw_log_writes replaced.
All LOGIFs and skygw_log_writes replaced with the equivalent
MXS_[ERROR|WARNING|NOTICE|INFO|DEBUG] macros.
2015-11-18 12:35:21 +02:00
f06eec13f6 Merge branch 'develop' into 1.2.1-binlog_router_trx 2015-11-17 09:50:25 +01:00
82dc3ff3c5 Update lastReply with heartbeat event
Update lastReply when heartbeat event is seen and a transaction is
still open
2015-11-17 09:47:21 +01:00
a90b336cc4 blr_master_reconnect instead of blr_start_master
blr_master_reconnect instead of blr_start_master in
blr_stop_start_master
2015-11-16 15:55:08 +01:00
a355e1beef Printf format checking added to logging function.
Printf format checking added to logging function and all
issues that were revealed by that fixed.
2015-11-16 12:40:49 +02:00
bcb918e60b Log: Another step in the move from logfiles to priorities.
skygw_[enable|disable]_log has now been removed from the external
interface and priorities must instead be set using
mxs_log_set_priority_enabled(int priority, bool enabled). A bitmask
is already being updated, but internally and as used by the LOG_IF
macros, the actual enabling is still made using logfile ids.

The configuration entries have been replaced as follows:

	log_messages -> log_notice
	log_trace    -> log_info

The old ones can be used, but cause a warning to be logged.

Similarily the maxadmin commands have been updated.
"[enable|disable] log ..." works as expected, but there will be
a message about it being deprecated. Instead there is now a
[enable|disable] log-priority err|warning|notice|info|debug
command that should be used instead.
2015-11-14 22:28:17 +02:00
6b88b6b17f Merge branch 'develop' into MXS-329-develop-20151111 2015-11-13 07:48:59 +02:00
2c1b53c120 Log: Cleanup of API
skygw_ functions removed and replaced with mxs_ equivalents.
logfile_id_t removed.
2015-11-12 18:31:53 +02:00
05fbdb1b76 Log: skygw_log_flush replaced with mxs_log_flush.
skygw_log_flush replaced with mxs_log_flush and skygw_log_sync_all
with mxs_log_flush_sync.
2015-11-12 18:28:34 +02:00
c7a329e43e Log: skygw_logmanager_init renamed to mxs_log_init.
skygw_logmanager_init renamed to mxs_log_init and skygw_logmanager_done
renamed to mxs_log_finish. skygw_logmanager_exit removed alltogether as
all it did was to call skygw_logmanager_done. That appears to have been
a source for confusion as in many places a call to skygw_logmanager_done
was followed by a call to skygw_logmanager_exit. In addition, the function
skygw_log_done was removed from the header, since it lacked an
implementation.
2015-11-12 16:06:44 +02:00
30d1fc66b7 getCapabilities no longer takes arguments and returns an int. 2015-11-11 18:14:03 +02:00
264944ff23 Service users are set to NULL after they are freed. 2015-11-11 18:02:01 +02:00
3346c9c30d Removed '' around slave_uuid
Removed '' around slave_uuid
2015-11-11 15:18:20 +01:00
acb0a523a7 Log: No more argv parsing for log manager.
Earlier, the global setting for the syslog decided whether syslog
was enabled when skygw_logmanager_init was called, but not whether
logging to syslog actually was made.

Now syslog logging is enabled by default and the global setting
decides whether or not syslog logging actually is made. That is,
this opens up the possiblity for making it possible to turn on
and off sysloging at runtime.

Further, although the API led you to believe otherwise, it was
hardwired that LOGFILE_ERROR and LOGFILE_MESSAGE messages were
written to syslog.

The changed removed the need for passing an argv array explicitly.
2015-11-11 13:53:14 +02:00
24bed47794 Syslog ident must be provided explicitly.
The syslog ident must be provided explicitly when calling
skygw_logmanager_init (and not provided via the argv array).
It can be NULL, in which case it automatically will be the program
name.

The openlog() call is now always made, irrespective of what the
value of the global syslog flag is. That way it will be possible
to turn syslog logging on or off after the fact.
2015-11-11 13:48:57 +02:00
55dbaa49c0 Logging target must be explicitly defined.
Whether the log-file should be written to the filesystem or to
shared memory must now be explicitly defined when calling
skygw_logmanager_init() (instead of passing that via the argc/argv
construct).

Also, the meaning of '-l' when invoking maxscale has been changed.

Earlier -l [file|shm] specified whether the trace and debug logs
should be written to shared memory (while the error and message
logs always were written to the filesystem) and the _default_
was to write them to shared memory.

Now, with only one file, '-l' has still the same meaning, but it
decides whether the one and only logfile should be written to shared
memory, or the filesystem and the _default_ is to write it to the
filesystem.
2015-11-11 13:47:34 +02:00
8395bad394 Added slave remote port in log messages
Added slave remote port in log messages
2015-11-11 12:19:58 +01:00
dee20fe077 Merge remote-tracking branch 'origin/develop' into MXS-329-develop-20151111
# Conflicts:
#	server/core/CMakeLists.txt
#	server/core/buffer.c
#	server/core/service.c
#	server/modules/filter/tee.c
#	server/modules/monitor/mysql_mon.c
#	server/modules/routing/binlog/blr.c
#	server/modules/routing/binlog/blr_slave.c
#	server/modules/routing/debugcmd.c
#	server/modules/routing/readwritesplit/readwritesplit.c
#	utils/skygw_utils.cc

- resolved.
2015-11-11 11:08:02 +00:00