17 Commits

Author SHA1 Message Date
Markus Mäkelä
ab4f870927
MXS-2067: Replace most SPINLOCKs
Replaced SPINLOCK with std::mutex where possible, leaving out the more
complex cases. The big offenders remaining are the binlogrouter and the
gateway.cc OpenSSL locks.
2018-09-28 12:18:23 +03:00
Niclas Antti
c447e5cf15 Uncrustify maxscale
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.
2018-09-09 22:26:19 +03:00
Niclas Antti
24ab3c099c Move top of the file "#pragma once" to after the following comment (swap them). If the comment is a BPL update it to the latest one 2018-08-21 13:13:15 +03:00
Markus Mäkelä
cbb8c68770
Remove router_options
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.
2018-07-11 14:08:56 +03:00
Markus Mäkelä
5903e194a7
Add runtime schemarouter reconfiguration
The schemarouter now also uses versioned configurations implemented by
shared pointers to configuration objects. Moved all the configuration
management into the Config class. Removed router options from
schemarouter.
2018-07-11 14:08:52 +03:00
Johan Wikman
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
Markus Mäkelä
bbfd9ce136 Move Backend and SessionCommand classes to the core
Using the same implementation of the Backend and SessionCommand classes in
both schemarouter and readwritesplit will prevent duplication of code.

This commit only splits the generic parts of the class to a Backend class
which the schemarouter then extends. The session commands for both routers
are similar so they require no special handling.
2017-06-22 10:40:16 +03:00
Johan Wikman
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
Markus Mäkelä
fc887c7f5f MXS-1220: Add old router diagnostic interface
Added back the old diagnostic entry point to the router interface.
2017-05-04 09:17:42 +03:00
Markus Mäkelä
076599ee5e MXS-1220: Make the parameters of the diagnostic entry points const
The diagnostic entry points should not modify the state of the object
being diagnosed.
2017-05-04 09:14:03 +03:00
Markus Mäkelä
eb3ff1cc7b MXS-1220: Implement JSON diagnostics for most routers
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.
2017-05-04 09:12:15 +03:00
Markus Mäkelä
66fa4fbc7d Use shared pointers to Backend classes
The schemarouter now uses shared pointers. This removes the need to copy
the class.

Following changes move the member variables inside the Backend class.
2017-03-31 14:12:02 +03:00
Markus Mäkelä
f5a259ba57 Do configuration outside of constructors
Configuration errors can be resolved before the instance is created. This
avoids the unnecessary throws that were generated when an error occured.

As the configuration is stored in the router, the router sessions can use
a pointer to it instead of copying it locally. This should avoid some
unnecessary copying if more complex configuration parameters are added.
2017-03-31 14:12:01 +03:00
Markus Mäkelä
b9fae58891 Favor pointers over references
The use of a pointer instead of a reference conveys the message that the
lifetime of the object being pointed can, and most likely will, exceed the
lifetime of the function.

Also shuffled the member variables and internal functions around and
removed unneeded function declarations.
2017-03-31 14:12:01 +03:00
Markus Mäkelä
02796e7304 Move #pragma to first line in each header
The `#pragma once` is now on the first line of each header.
2017-03-31 14:12:01 +03:00
Markus Mäkelä
39903e40b7 Rename member variables
Renamed and cleaned up schemarouter member variables. Removed unused
variables.
2017-03-31 14:12:00 +03:00
Markus Mäkelä
ac641e0f22 Use router template in schemarouter
The schemarouter now uses the router template.
2017-03-31 14:12:00 +03:00