f2d2202ea3
MXS-2304 Use get_enum() instead of config_get_enum()
2019-02-01 10:29:24 +02:00
c8a84cebd0
MXS-2304 Use get_integer() instead of config_get_integer()
2019-01-31 18:12:25 +02:00
63b5eab89e
MXS-2304 Convert configuration management structs to classes
...
The fields of MXS_CONFIG_PARAMETER remain unchanged so that parameter
processing can be changed gradually.
2019-01-31 17:57:16 +02:00
03411e825d
MXS-2271 Move journal_max_age inside settings container
2019-01-31 17:05:35 +02:00
ce9b49d8d5
MXS-2271 Move script-related settings to the settings-container
...
Also moves related functions to class methods.
2019-01-31 17:05:34 +02:00
0903648542
MXS-2271 Move connection settings inside settings struct
...
Since the settings are now protected fields, all related functions were
moved inside the monitor class. mon_ping_or_connect_to_db() is now a method
of MXS_MONITORED_SERVER. The connection settings class is defined inside the
server since that is the class actually using the settings.
2019-01-31 17:00:47 +02:00
4ee0e9364e
MXB_MODULE_NAME must be defined before maxbase/log.h is included
...
Otherwise MXB_MODULE_NAME will be NULL.
2019-01-31 15:23:32 +02:00
b650dd4f67
MXS-2273 Drop unnecessary SERVER prefix in names
...
MXS_MONITORED_SERVER provides enough scope.
2019-01-30 12:16:57 +02:00
bc4a52acb0
MXS-2273 Set SERVER_BEING_DRAINED properly
...
The maintenance and being-drained modes are now set using the same
mechanism.
2019-01-30 12:16:57 +02:00
e3d74bd18d
MXS-2273 Generalise names
...
The maintenance flag and being-drain flags will be turned on using
the same variable, so the variable and constant names needs to be
generalized.
2019-01-30 12:16:57 +02:00
159d9ccba9
MXS-2273 Move constants to more appropriate locations
...
Constants now used in the context of MXS_MONITORED_SERVER or
Monitor are now moved from SERVER to MXS_MONITORED_SERVER or
Monitor, respectively.
2019-01-30 12:16:57 +02:00
57a94b417d
MXS-2273 Move maint_request from SERVER to MXS_MONITORED_SERVER
...
The _request_ for setting the status of a server relates to the
monitor and its MXS_MONITORED_SERVER, not to the SERVER itself.
2019-01-30 12:16:57 +02:00
727d3feb3b
MXS-2273 Move code for setting maintenance bit to monitor.cc
...
Applies to being-drained as well.
Better that this special handling is handled by Monitor that needs it.
2019-01-30 12:16:57 +02:00
0e92affcc3
MXS-2273 Honour BEING_DRAINED in Backend::can_connect()
...
This will cause the drain bit to be honoured in RWS and Cat routers.
2019-01-30 12:16:57 +02:00
1f47e52c7b
MXS-2273 Introduce SERVER_BEING_DRAINED bit
...
With this bit set, existing connections to a server should not be
closed, but no new connections should be created to the server.
The bits have also slight been rearranged.
- Bits 0 - 15 are now reserved for bits applicable to all servers
- Bits 16 - 31 are monitor specific
Further, the cases whether a server can be connected to and whether
it can be used, but be separated.
2019-01-30 12:16:57 +02:00
6326172325
MXS-2271 Rename basic Monitor fields
...
Adds the m_-prefix.
2019-01-28 15:41:00 +02:00
cef4e836bc
MXS-2271 Store monitored servers in a vector
...
The array is still a public member because it's used in several non-member functions.
2019-01-28 15:41:00 +02:00
546b80de4b
MXS-2271 Move monitor interval to settings container
2019-01-25 13:46:01 +02:00
10dc0f53e0
MXS-2177 Move check_monitor_permissions() into class
2019-01-25 13:46:01 +02:00
0fe5b0bec9
MXS-2276 Expose lower level mon_ping_or_connect_to_db
...
The functionality is useful also when you do not have a
MXS_MONITORED_SERVER instance.
2019-01-25 10:28:34 +02:00
5afceb1185
MXS-2274 Reserve names starting with @@
for use by MaxScale
...
Names starting with '@@' can now longer be used in configuration files.
Subsequent commits will prevent such names from being used when objects
are created dynamically.
2019-01-24 17:42:29 +02:00
f559bf3d95
MXS-2271 Move disk space settings to a settings-container
2019-01-24 09:49:53 +02:00
00594cc369
MXS-2271 Move global monitor list inside a local class
...
Cleans up list locking and handling.
2019-01-24 09:49:53 +02:00
f6cec41dd8
MXS-2271 Monitor config name and instance name are parameters of createInstance()
...
Also adds/moves some comments from previous entrypoints. Name and module
are now constant fields.
2019-01-24 09:49:53 +02:00
9ac8bf93bb
MXS-2271 Rename monitor-related classes
...
MXS_MONITOR->Monitor
MonitorInstance->MonitorWorker
MonitorInstanceSimple->MonitorWorkerSimple
2019-01-22 15:59:17 +02:00
465f9f16c4
MXS-2271 Remove unused monitor entrypoints
2019-01-22 15:59:17 +02:00
dadb6a1a79
MXS-2271 All monitors inherit from MXS_MONITOR
...
Most of the API entrypoints are replaced with virtual functions.
2019-01-22 15:59:17 +02:00
3321a591ef
MXS-2271 Move some monitor management functions to an internal class
...
The class MonitorManager contains monitor-related functions that should not
be called from modules. MonitorManager can access private fields and methods
of the monitor.
2019-01-22 10:31:06 +02:00
7fb80c530b
Merge branch '2.3' into develop
2019-01-21 14:05:16 +02:00
7f978f275f
MXS-2223 Log a message when a slave is discriminated due to replication lag
...
Both the replication lag and the message printing state are saved in SERVER,
although the values are mostly used by readwritesplit. A log message is printed
both when a server goes over the limit and when it comes back below.
Because of concurrency issues, a message may be printed multiple times before
different threads detect the new message state.
Documentation updated to explain the change.
2019-01-21 13:02:18 +02:00
dd16a09342
MXS-2271 Move some initializers out of monitor_create()
2019-01-17 18:24:28 +02:00
40f58ddec8
MXS-2271 Use std::mutex instead of pthread_mutex
2019-01-17 17:51:39 +02:00
3125d1babf
MXS-2271 Convert MXS_MONITOR and MXS_MONITORED_SERVER to classes
...
First step in monitor refactoring and cleanup.
2019-01-17 17:43:54 +02:00
3b55893a20
Combine maxscale/buffer.h with maxscale/buffer.hh
2019-01-17 12:37:40 +02:00
f7d97825fb
MXS-2219 Add monitor_stash_current_status
...
The functions stores the current server status to the monitored
server's mon_prev_status and pending_status fields.
To be used at the start of the monitor loop, before the pending
status fields are updated.
2019-01-17 11:11:21 +02:00
994b76ff79
MXS-2219 Provide STL iterator for MXS_MONITORED_SERVER
2019-01-17 11:11:21 +02:00
d4674faa7d
Convert maxscale/query_classifier.h to .hh
...
The header was not merged with queryclassifier.hh since the latter
does not include the former.
2019-01-15 18:18:39 +02:00
45bfbbdd9e
Convert maxscale/protocol.h to .hh
2019-01-15 17:26:26 +02:00
b0663f0b29
Convert maxscale/ssl.h to .hh
2019-01-15 17:12:32 +02:00
fb2a44f62d
Fix filter template documentation
...
Filter options are no longer used.
2019-01-15 14:10:55 +02:00
684ec3288b
Rename and cleanup authenticator.h
2019-01-14 15:07:33 +02:00
b4d91d4b9a
Move query result helper class to maxsql
...
Added some asserts to ensure the class is used correctly.
2019-01-14 10:43:17 +02:00
6d296f6661
MXS-2220 Move authenticator instance data to internal class
2019-01-11 11:31:27 +02:00
9cac927542
MXS-2220 Move server response calculation functions inside class
2019-01-10 10:26:53 +02:00
df17619722
MXS-2220 Move server_update_address inside class
...
Should be moved to internal class once blr is cleaned up.
2019-01-10 10:26:53 +02:00
5a698be45c
MXS-2218 Centralize worker shutdown handling
2019-01-08 16:01:36 +02:00
6ba2cb61df
MXS-2218 Implement housekeeper in terms of MainWorker
2019-01-08 16:01:36 +02:00
026bf747e6
MXS-2218 Add functionality for mxs_clock
2019-01-08 16:01:36 +02:00
2d2f62ed6f
MXS-2218 Add showing and to_json functionality
2019-01-08 16:01:36 +02:00
d50ae1fb8a
MXS-2218 Treat all routing workers the same way
...
All routing workers are now started an stopped the same way.
2019-01-08 16:01:36 +02:00