When running BLR locally, you need to be able to specify what
IP the BLR is visible at (127.0.0.1 does not work for VM nodes)
and also to perform cleanup etc. action when needed.
The binlogrouter uses buffers across worker threads which is no longer OK
in 2.3. The correct solution would be to store data in something other
than a GWBUF (e.g. std::vector) and protect the sharing with a mutex. The
current solution simply works around the assertions by using macros
instead of functions.
Several small changes:
Binlog is flushed at the end of old master demotion.
Only new master is required to catch up to old master.
Use the same replication check method as failover.
Fix comments.
Fix a bug in make_valid().
Change sync time (when the average should be pushed to the server EMA)
to only depend on time, not use sample_max. This decreases the amount of
sync calls, and allows for a much shorter sync time. Testing shows this to be
more stabel and allow better control of the sample_max.
As buffers are meant to be used only within a particular session, the
atomic operations are no longer necessary and can thus be removed. This
removes the extra overhead that the atomic operations add.
By biasing the values of all counter type scores to positive integers, the
server weights are always taken into use.
This fixes the case when weights were ignored until all score base values
were larger than zero (the mxs922_server test).
If the DCB is closed in handleError, it would be NULL in closeSession. To
only close the DCB in one place, the handleError can be reduced to writing
an error to the client and marking the failure as a fatal one.
The reads now read as much of the data as is available to reduce the
number of distinct malloc calls that need to be made. The SSL_read also
now allocates the buffer before reading into it so that the amount of
copying is reduced.
Also removed some of the not quite helpful debug messages.
No longer writes events to the master, as this creates problems if the
promoted server was not the overall master. Instead, the slave status
output is inspected.
If the log file is successfully opened, both stdout and stderr are
redirected to it. This helps catch ASAN reports without having to read the
system journal files.
As the output is redirected to a file, some of the output was made visible
only in non-daemon mode. This helps keep the log file clean and readable.