109 Commits

Author SHA1 Message Date
vraatikka
481096ccef Added trace log to newSession and to closeSession. 2013-08-22 10:46:14 +03:00
Mark Riddoch
fbc311730c Bug 124: Add log message when an invalid router option is supplied 2013-08-13 15:14:32 +02:00
Jan Lindström
2e11a26f41 Fixed bug on candidate selection. I misinterpreted count and n_connections variables. Thus, renamed count as current_connection_count to make it more understandable. 2013-08-13 12:12:19 +03:00
Jan Lindström
c1c8bf9fc5 Removed unnecessary loop of servers. Now we loop over all the servers, if running server is found and candidate is not set we set that server as candidate. If candidate is set and we find any that have fewer connections than our candidate server. If a server has less connections than the current candidate we mark this as the new candidate to connect to. If a server has the same number of connections currently as the candidate and has had less connections over time than the candidate it will also become the new candidate. This has the effect of spreading the connections over different servers during periods of very low load. 2013-08-13 11:55:34 +03:00
vraatikka
6c106bb9be Removed #if defined(SS_DEBUG) macros around trace log print commands. Trace log is disabled by default but it is meant to be possible to enable it with other than debug build only. 2013-08-09 15:27:02 +03:00
vraatikka
d94153c29f If maxscale is compiled with DEBUG=Y readconnrouter module writes slave selection info to trace log. Example:
SkySQL MaxScale Thu Aug  8 00:01:08 2013
------------------------------------------
2013 08/08 00:01:17  Selected server in port 3003 to as candidate. Connections : 0 
2013 08/08 00:01:17  Examine server in port 3002 with 0 connections. Status is 5, inst->bitvalue is 6
2013 08/08 00:01:17  Examine server in port 3001 with 0 connections. Status is 5, inst->bitvalue is 6
2013 08/08 00:01:17  Examine server in port 3000 with 0 connections. Status is 3, inst->bitvalue is 6
2013 08/08 00:01:17  Final selection is server in port 3003. Connections : 1 
2013 08/08 00:01:22  Selected server in port 3003 to as candidate. Connections : 1 
2013 08/08 00:01:22  Examine server in port 3002 with 0 connections. Status is 5, inst->bitvalue is 6
2013 08/08 00:01:22  Examine server in port 3001 with 0 connections. Status is 5, inst->bitvalue is 6
2013 08/08 00:01:22  Examine server in port 3000 with 0 connections. Status is 3, inst->bitvalue is 6
2013 08/08 00:01:22  Final selection is server in port 3002. Connections : 1
2013-08-08 00:10:33 +03:00
vraatikka
cae4d38a7e Removed unnecessary argument from log manager commands because it is not used and it is always NULL. 2013-08-04 23:30:47 +03:00
Massimiliano Pinto
ce8ce5b8fd Added a check for candidate server, if NULL return 2013-07-31 16:18:45 +02:00
Timofey Turenko
a7c82310f9 moving files to /server to make merge possible 2013-07-28 05:31:11 +00:00