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
92306c565b
MXS-2218 Add housekeeper functionality to MainWorker
...
In preparation for moving the housekeeper functionality on top
of MainWorker.
2019-01-08 16:01:36 +02:00
10216524ab
MXS-2218 Add skeleton MainWorker
...
First step in the introduction of a MainWorker. When finished, all
routing workers will run in separate threads (currently one runs in
the main thread), and the main worker run in the main thread.
Housekeeper will disappear and to the extent housekeeping tasks are
needed (where applicable they will be changed into delayed calls)
they will be run by the main worker.
2019-01-08 16:01:36 +02:00
1c647f3753
MXS-2220 Move most remaining functions inside class
...
Most of the ones still remaining outside are special cases.
Also, removed locking from status manipulation functions as it
has not been required for quite some time.
2019-01-08 15:15:34 +02:00
d5c78eb31f
MXS-2220 Move more server functions inside class
2019-01-08 15:12:47 +02:00
8b53e30678
MXS-2220 Move server status functions inside class
2019-01-08 15:12:47 +02:00
93aff0640c
MXS-2220 Cleanup server header
...
Moved items around in preparation for more changes.
2019-01-07 16:10:15 +02:00
03adee2030
MXS-2220 Run uncrustify on server headers
2019-01-07 16:10:15 +02:00
b16ee3a94e
MXS-2220 Move server_is_active inside the class
2019-01-07 16:10:15 +02:00
764d9a4e75
MXS-2220 Move monitor user and password fields to internal class
...
Also changed the lengths of the buffers.
2019-01-07 16:10:15 +02:00