Commit Graph

1974 Commits

Author SHA1 Message Date
d99cece151 Removed the 16 chars limitation for binlog file name
Removed the 16 chars limitation for binlog file name
2016-01-07 15:29:11 +01:00
9ba2e4b97e Changed burst_size to long instead of unsigned long
Changed burst_size to long instead of unsigned long.
This way check burst_size > 0 is now effective.

Setting "burstsize" option in router_options may be required.
i.e.: burstsize=10M
2015-12-30 16:14:13 +01:00
e9755ba2b6 Remove file from slave
The binlog file is now always opened when it is needed and closed
when we are finished with it. That will remove any potential
file concurrency issues between different threads dealing with
the same slave.
2015-12-29 09:47:37 +02:00
05fb07f996 Removed extra brace
Removed extra brace
2015-12-28 18:00:55 +01:00
4f8340f5b2 Changed behaviour for a slave requesting master_log_pos beyond binlog file size
Slave request for a log_pos behind binlog file size may result in a
disconnection or replication error:

if binlog file is latest one slave get disconnected otherwise an error
message is returned and replication stops
2015-12-28 18:00:52 +01:00
aff3f66fa6 Fixed compilation error for slavelag.c
There was an extra parenthesis left when skygw_log_write was changed to
MXS_ERROR which caused the compilation to fail.
2015-12-23 06:45:28 +02:00
3139be8e5a Fixed SHOW SLAVE STATUS showing obsolete slaves
If SHOW SLAVE STATUS was executed after DISCONNECT ALL it was possible that
some of the disconnected slaves were used when printing slave hosts.
2015-12-10 15:50:20 +02:00
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
992d6fb3bc Fix to MXS-501: Tee filter and USE ... no longer hangs
Some of the data was not reset for the branch session when a query
was not duplicated which could lead to a hang. Also the COM_FIELD_LIST
duplicated to the branch session even though it doesn't change the
session state.
2015-12-10 09:56:06 +02:00
5ebdd6f47d Fix signed/unsigned problem in tee.c 2015-12-10 08:41:20 +02:00
a663a8ec5c Fix to MXS-500: Statement cloning is now properly handled
If a statement wasn't cloned for the Tee filter, the session would be closed
leading to a possible hang. Instead of closing the session when a statement
isn't cloned, it should not expect a response from that server for that statement.
2015-12-09 13:48: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
89bdf179b7 Added newlines at the end of all files
Some files were missing newlines as the last character in the file, causing
errors to appear on some systems.
2015-12-08 09:23:55 +02:00
d6afe70c6f Fix to MXS-323: Routers properly handle client DCB errors
All routers now detect if a client DCB is passed to handleError and
take the appropriate action.
2015-12-02 18:01:14 +02:00
9da0c206bb Added missing brackets
Some curly braces were missing from readconnroute and some function declarations
were misaligned.
2015-12-02 13:36:18 +02:00
45abfeec2c Fix to MXS-494: Fixed readconnroute weight calculation
The calculation of weights used the actual amount of connections instead of
actual amount of connections + 1. This lead to the weight being effectively
ignored for servers with no connections.
2015-12-02 13:36:18 +02:00
91eba965fc Formatted readconnroute
Formatted readconnroute files according to the style guide.
2015-12-02 13:36:18 +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
2e127ef38e Fix to MXS-429: Missing parameter no longer causes a crash
If a server is missing a weighting parameter the default weight will be used.
2015-12-01 12:22:47 +02: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
02da87f737 Fix to MXS-439: Weightby value of 0 no longer causes a crash
A weightby parameter with a value of 0 no longer causes SIGFPE and the
invalid weight value is set to the correct value of 1.
2015-11-30 19:06:04 +02:00
ac174437f3 Master/slave bits now handled in one place
The master and slave bits were previously set in more then one place.
This spread out the handling of those status bits and now all replication
related bits are set in one place.
2015-11-30 11:50:36 +02:00
609ed62a69 Fixed galeramon not setting server status for downed servers
If galeramon isn't able to connect to a Galera node, the server state is left
unaltered. This will cause servers that lose connectivity to be in RUNNING|JOINED
state which causes them to be assigned with the SLAVE status. For servers that are
never accessible, the state will be RUNNING.
2015-11-30 11:50:36 +02: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
3cd648fa09 Fixed telnetd soname
The telnetd was missing the VERSION target property which activates the
soname generation for CMake.
2015-11-30 10:46:08 +02: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
384029c109 MaxScale log called consistently for maxlog
There were some variance regarding the way the MaxScale log (i.e.
the file log) was called; "maxlog" in configuration file and
"maxscalelog" at the command line and maxadmin interface. Now it
is uniformly referred to as "maxlog" in the configuration file, at
the command line, from maxadmin and in the code.
2015-11-27 16:10:37 +02:00
2feb2ed3a2 Prevent disabling error log priority.
It should not be possible to disable the error priority as error
messages should always be logged.

In addition some minor corrections of command line texts.
2015-11-27 16:09:57 +02:00
f441f72b75 Added support for librabbitmq-c 0.6.0 and newer
The 0.6.0 version of librabbitmq-c added two parameters to amqp_exchange_declare
which allow auto-deleted and internal exchanges. This change requires more
advanced version detection so that code could be conditionally compiled for
newer versions of the library.
2015-11-27 12:21:19 +02: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
63da12e5b5 Corrected bugs introduced by refactoring of the dbfwfilter
The limit_queries parsing used a bad initial value for the return value
which lead to a guaranteed failure. Other parts of the code used wrong values
for comparisons leading to sporadic parsing errors.
2015-11-26 09:59:39 +02:00
443bbe73d2 Mqfilter is built if possible
The mqfilter was not built by default even though it should have been. This has
been fixed but the filter is built only if librabbitmq is found. This was done
to avoid having the librabbitmq and its development headers as a hard
dependency.
2015-11-26 09:28:27 +02:00
8ae187622c Fixed weightby overflow being silently ignored in readwritesplit
If individual servers had a weightby parameter value greater than INT_MAX * 1000
the integer used for calculation would overflow and the server would end up
having a negative weight. This would cause all connections to pile up on this
server.

The same overflow was possible for the sum of all the weightby parameter values
even if no single parameter exceeded the limit.
2015-11-25 22:43:46 +02:00
b0458b3cc4 Fixed wrong value being used for users rules in dbfwfilter
A parsed, local copy of the string was duplicated instead of the original string
which caused the parsing to always fail.
2015-11-25 17:39:18 +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