45 Commits

Author SHA1 Message Date
Markus Mäkelä
40d73948a9
MXS-1662: Move mxs_crypt into utils
Moved the mxs_crypt function into utils and renamed to mxs::crypt (no C
code used it).
2019-04-05 00:42:00 +03:00
Markus Mäkelä
cb957200c9
MXS-1951: Detect SO_REUSEPORT support
The support for SO_REUSEPORT is now detected at runtime.
2019-03-28 16:34:12 +02:00
Markus Mäkelä
e745d1cffb
MXS-2312: Use default network buffer sizes
Removed the hard-coded network buffer sizes. This effectively makes them
configurable via the kernel.
2019-03-28 16:34:12 +02:00
Johan Wikman
c0c9a9858d MXS-2197 Rename maxscale/log.h to maxscale/log.hh
In files either include maxscale/log.hh or remove include entirelly
as maxscale/ccdefs.hh includes it.
2018-12-10 12:58:17 +02:00
Johan Wikman
1b5b789342 MXS-2208 Move trim-functions from maxscale to maxbase
log.h now includes string.hh, which is conceptually wrong, but
log.h will shortly disappear and be superceded by log.hh.
2018-12-10 12:50:07 +02:00
Esa Korhonen
d96a7dedc5 MXS-2205 Convert maxscale/poll.h to .hh 2018-12-04 14:51:02 +02:00
Markus Mäkelä
ad12ff6d06
MXS-2196: Rename dcb.h to dcb.hh 2018-12-04 11:50:43 +02:00
Markus Mäkelä
3b5e45ceee
MXS-2196: Combine session.h and session.hh
Combined the public session headers into one.
2018-12-04 11:43:38 +02:00
Markus Mäkelä
77585bdb8c
MXS-2197: Make config.h and service.h C++ headers
This is the first step into converting the other headers into C++.
2018-11-30 12:15:57 +02:00
Esa Korhonen
a1e1ac0012 Move string_printf to maxbase
Can be used in tests.
2018-11-29 12:21:40 +02:00
Johan Wikman
cf66cc6968 Merge branch '2.2' into 2.3 2018-11-28 11:27:44 +02:00
Markus Mäkelä
6451b1f21a
MXS-2183: Fix memory leaks
Under heavy load some of the basic network operations could fail which led
to some of the allocated memory to leak.

Also the backend protocol never freed the current protocol command if it
was not completed. This would happen if a user executed a session command
as the first command but backend authentication would fail.
2018-11-28 02:03:00 +02:00
Markus Mäkelä
75ea1b6ea1
Fix formatting of new(std::nothrow)
The code previously formatted everything as `new( std::nothrow)`.
2018-10-04 21:50:44 +03:00
Markus Mäkelä
8ad045c019
Remove extra header
The curl header isn't needed nor is it present when building.
2018-10-03 11:58:02 +03:00
Markus Mäkelä
8b9fdaa0cb
Remove HTTP functionality
It wasn't used so it can be removed.
2018-10-03 08:41:45 +03:00
Markus Mäkelä
4216ffa384
Use std:🧵:hardware_concurrency
Using a standard-defined value is better than a system specific one.
2018-10-03 08:41:43 +03:00
Markus Mäkelä
75f9921ca2
Merge branch '2.2' into develop 2018-10-02 10:18:09 +03:00
Markus Mäkelä
93d866c6a7
MXS-2073: Add missing TCP_NODELAY for client sockets
The client connections had the Nagle algorithm enabled which could cause
bad performance with smaller workloads. The common network configuration
code in utils.cc, currently used by the backend connections, sets it
properly.
2018-10-02 09:44:00 +03:00
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
Markus Mäkelä
71ffef5708
Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +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
Markus Mäkelä
a6bef0a80d
Add credentials for remove REST API calls
The base URL and credentials used for REST API calls can now be defined in
the [maxscale] section. This allows encrypted passwords to be used.
2018-08-23 15:46:46 +03:00
Markus Mäkelä
1692765503
Enable query classifier cache by default
Enabling it will give a performance improvement and it offloads work from
the CPU. This leads to better and more complete utilization of system
resources.
2018-08-23 15:46:45 +03:00
Markus Mäkelä
934600f8fc
Add minimal HTTP GET test
The test does a request and prints the responses. It is done to see that
the functionality works. Also added a timeout of 10 seconds to both the
connection and data transfer phases.
2018-08-23 15:46:45 +03:00
Markus Mäkelä
f8fb9510c9
Add HTTP GET function
The function performs a HTTP GET on a URL and returns the HTTP response.
2018-08-23 15:46:45 +03:00
Johan Wikman
3f53eddbde MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message] 2018-08-22 11:34:59 +03:00
Johan Wikman
cf0aeed516 MXS-2014 Rename log_manager.h to log.h
There's nothing resembling a manager anymore.
2018-08-17 10:59:37 +03:00
Markus Mäkelä
2852530893
Use standard RNG
The custom random number generator can now be replaced with a C++11
RNG. This greatly improves the reliability and trustworthiness of it.

In addition to this, the conversion of the RNG to a thread-local object
removes the race condition that was present in the previous
implementation. It also theoretically improves performance by a tiny bit.
2018-08-13 10:37:48 +03:00
Esa Korhonen
862ae099b0 Construct diagnostics results in the monitor thread
MariaDBMonitor diagnostics printing is unsafe as some of the read
fields are arrays. To be on the safe side, the fields are now read
in the monitor worker thread.

Since diagnostics must work even for stopped monitors, a worker task
is used. In practice, it usually runs when the monitor is sleeping.
2018-07-20 10:18:58 +03:00
Johan Wikman
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
Esa Korhonen
a2cd4feeaf Store server states as 64-bit to the monitor journal
The journal schema version was changed.
2018-05-24 11:35:34 +03:00
Markus Mäkelä
755d080161
MXS-1810: Add C++ hex conversion functions
Added mxs::to_hex for uint8_t types and uint8_t containers.
2018-04-26 13:44:23 +03:00
Johan Wikman
e1f1d8e58a Merge branch '2.1' into 2.2 2018-02-02 16:05:14 +02:00
Markus Mäkelä
8b2aa52384 Merge branch '2.1' into 2.2 2017-12-29 08:42:49 +02:00
Markus Mäkelä
79afaa447e Merge branch '2.1' into 2.2 2017-12-12 13:23:02 +02:00
Markus Mäkelä
895d950da0 Format all source files with Astyle
Formatted all source files Astyle.
2017-09-28 07:04:21 +03:00
Markus Mäkelä
2633ad2fe4 Merge branch '2.1' into 2.2 2017-09-26 14:29:14 +03:00
Johan Wikman
de7004cb95 Merge branch '2.1' into develop 2017-08-15 10:31:30 +03:00
Markus Mäkelä
854c4a1ed3 Add support for non-glibc systems
MaxScale can now be built on systems that use an alternative libc
implementation e.g. musl.
2017-08-02 11:51:55 +03:00
MassimilianoPinto
cb57e10761 Develop merge
Develop merge
2017-06-29 15:34:22 +02:00
Johan Wikman
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
Markus Mäkelä
47c1e9d533 MXS-1220: Deprecate whitespace in object names
All whitespace in object names is now converted to a compacted format with
whitespace replaced with hyphens. If a conversion takes place, a warning
is logged.

Converted some of the tests into C++ as they directly include .cc files.
2017-05-04 09:12:15 +03:00
Markus Mäkelä
caf2172677 MXS-1220: Fix minor problems with admin thread
The admin thread now uses blocking IO. This is not optimal but it
simplifies the code by some amount.

Fixed option processing removing one extra character from key name.

Use correct member variable when checking for the option map end.
2017-05-04 09:11:18 +03:00
Markus Mäkelä
ad1c05b015 Merge branch '2.1' into develop 2017-04-05 11:35:13 +03:00
Johan Wikman
b04e8b93c9 Compile statistics, thread, users and util as C++ 2017-03-24 11:05:55 +02:00