The Galera documentation tells us to use the galera_new_cluster command to
start a new Galera cluster. This should prevent the problems of nodes
failing to join the cluster either on the initial startup or after a node
goes down.
When poll_add_dcb was called for a DCB that once was polling system but
was subsequently removed, the DCB would appear twice in the worker's list
of DCBs. This caused a hang when the DCB was the last one in the worker's
list and dcb_foreach_local would be called.
To prevent the aforementioned problem, the DCBs are now added and removed
directly to and from the workers instead of indirectly via poll_add_dcb
and poll_remove_dcb.
If the connection to the master is lost, knowing what type of an error
caused the call to handleError helps deduce what was the real reason for
it. Logging the idle time of the connection helps detect when the
wait_timeout of a connection is exceeded.
The script adds config and log files into a zip archive. Passwords in
config files are censored. Also attempts to read current status by calling
maxctrl. If core-file exists, runs gdb on it to gather call stack.
The script is installed to the binary file directory.
The code used a rather questionable method for parsing SQL statements
instead of using the query classifier for detecting transaction start and
stop events.
Added a minimal CDC client application that uses the CDC connector
library. This is mainly intended for manual testing so it is built using
the accompanying Makefile instead of being a part of the CMake system.
The process of appending to a std::string always includes a size check in
case the internal storage needs to expand. Given that we know a
canonicalized version of a query string is never larger than the original
string and that we pre-allocate enough memory to cope with the worst-case
scenario, the extra logic in std::string::push_back is unnecessary and an
extra cost. Writing directly into the string avoids this cost and improves
the performance.
Switched from default character type functions to ones that use lookup
tables. Eliminated the internal state and replaced with in-place iteration
of the query. Added code to allow single-lookup detection of normal
characters.
The log message should now contain enough information to more easily debug
any configuration issues that result from updating the main config file
after runtime changes have been done.
Also fixed the theoretical race condition in detection of persisted
configuration files by only checking for their existence once.
By storing the server statistics object in side the session, the lookup
involved in getting a worker-local value is avoided. Since the lookup is
done multiple times for a single query, it is beneficial to store it in
the session.
As the worker-local value is never deleted, it is safe to store a
reference to it in the session. It is also never updated concurrently so
no atomic operations are necessary.
The code now only checks the need for a keepalive ping once every
keepalive interval. Reduced the number of mxs_clock calls to one so that
all servers use the same value.
By default the notifications are only allowed from the main process or any
child process that systemd finds. When the main process has not yet been
detected by systemd but MaxScale sends a notification, an error is logged
into the system journal. To prevent this, notifications from all member
processes should be allowed.
All global parameters are now handled by the runtime configuration
modification code. The parameters that are trivial to update can now be
updated at runtime. All other global parameters cause a new error message
to be returned stating that the parameter in question cannot be modified
at runtime.
Also updated the list of modifiable parameters in MaxCtrl. This list
should not be stored in MaxCtrl and should be created by MaxScale at
runtime.