The preparation and closing of prepared statements was sent to all servers
even though the execution was always sent to the master. With this change,
all queries which interact with prepared statements are only sent to the master.
The sending of statement preparations to all servers is a problem when a
statement which depends on a database or a table is created and the DDL
statement which created that table has not yet been replicated to the
slaves.
In addition to fixing the aforementioned problem, this change should also
reduce unnecessary network traffic to slaves and improve the overall
performance of the prepared statements.
The various global directory setter functions now process the input they receive
and remove redundant and trailing forward slashes from the directory paths.
When MaxScale perceives a state change in one of the servers it will log
an message into the log file stating the previous and the current state.
This will make it easier to analyze failures in the cluster.
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
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
It was possible that a backend server was doing authentication while the client
closed the session. The more connections the router created the more likely it
was. This caused unnecessary reloading of the database users and confusing error
messages.
With the implemented fix, there are additional checks for the session state
before the users are reloaded or error messages are logged.
Since the PCRE2 library was always going to be a part of MaxScale, there was
no real reason to have it as a shared library apart from smaller binaries.
The username matching was working as intended but the session's active value
was ignored when queries were being routed. This meant that both the username
and the IP address of the user were ignored and query replacement was always
done.
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.
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.
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
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
Changed default number of threads to 1 instead of autoconfigured value and
added a new `auto` variable which enables autoconfiguration of thread count.
The number of threads used when autoconfiguratio fails was changed from 4 to 1.
The default value of using N threads where N is the number of CPU cores was
not optimal as the possibility of rescheduling was higher the more utility
threads there were. Due to this, N-1 is deemed to be the better autoconfigured
value for thread count.
Made some variables stack allocated so there is no change of memory leaking.
There was no real reason to allocate memory from the heap for the variables in
question since they did not need to persist outside the scope of the function.
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.
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.
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.
When generating a fake hangup event, EPOLLRDHUP is used if available,
otherwise EPOLLHUP. process_pollq(int) does the same thing both in the
case of EPOLLRDHUP and EPOLLHUP, so it seems this should work.
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.