Minor renaming of the session state enum values. Also exposed the session
state stringification function in the public header and removed the
stringification macro.
Allocating the session before a DCB guarantees that at no point will a DCB
have a null session. This further clarifies the concept of the session and
also allows the listener reference to be moved there.
Ideally, the session itself would allocate and assign the client DCB but
since the Listener is the only one who does it, it's acceptable for now.
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
Relaced router_options with configuration parameters in the createInstance
router entry point. The same needs to be done for the filter API as barely
any filters use the feature.
Some routers (binlogrouter) still support router_options but using it is
deprecated. This had to be done as their use wasn't deprecated in 2.2.
All routers except the binlogrouter now fully implement the JSON
diagnostic entry point. The binlogrouter needs to be handled in a separate
commit as it produces a large amount of diagnostic output.
General code cleanup. Routing error detection now more robust.
Remove some unused code. Debug messages now use "unique_name" when
referring to servers.
Supports hint types:
-master
-slave
-named server
-all
A default action, which is performed when no hint exists or on error,
can be set. The different actions are analogous to the hint types.
A maximum connection number for slaves can be set. If more slaves are
configured for the service, the filter will rotate slaves for new sessions.
Within a session with multiple slaves, the "route_to_slave"-hint will
also rotate among the slave backends.
The static module capabilities are now used to query the capabilities of
filters and routers. The new RCAP_TYPE_NOAUTH capability is also taken
into use. These changes removes the need for the `is_internal_service`
function.
The static capabilities declared in getCapabilities allows certain
capabilities to be queried before instances are created. The intended use
of this capability is to remove the need for the `is_internal_service`
function.
The hintrouter is now in principle capable of routing requests
to the master or to some slave (in a round robin fashion) based
upon hints set by some earlier filter.
Note that as the router is completely oblivious of transaction
boundaries, using it with transactions and autocommit being off
will not make anyone happy.
Recognizing transaction boundaries using regexes and then pinning
the server until transaction commit would be needed.
The routers no longer need to track the number of errors each DCB
receives. This is now done by the protocol modules.
The type of the DCB no longer needs to be checked in the handleError
implementation as the function is only called when a backend DCB fails.