Commit Graph

8217 Commits

Author SHA1 Message Date
ea243fd8ba MXS-2329 Use durations in readwritesplit 2019-04-30 13:02:53 +03:00
ca51316364 MXS-2329 0 is a valid duration, with or without a suffix 2019-04-30 13:02:53 +03:00
0f5972e010 MXS-2329 Use durations with BLR:[heartbeat|connect_retry] 2019-04-30 13:02:53 +03:00
b1a495b342 MXS-2329 Use durations with persistmaxtime 2019-04-30 13:02:53 +03:00
93e130bb48 MXS-2329 Use durations with max_retry_interval 2019-04-30 13:02:53 +03:00
75fbcc9393 MXS-2329 Use durations in log_throttling 2019-04-30 13:02:53 +03:00
9fb4116bf5 MXS-2329 Use durations with connection_timeout 2019-04-30 13:02:53 +03:00
638debcdc0 MXS-2329 Allow the restriction of duration units
It's now possible to specify in the config parameter declaration
that the smallest allowed unit is seconds. For parameters whose
granularity is seconds, allowing to specify a duration in
milliseconds would open up a possibility for hard to detect errors.
2019-04-30 13:02:53 +03:00
8a250a8b13 MXS-2329 Make duration misuse harder
Now the desired type must be specified when getting a duration.
The type also dictates how durations without suffixes should be
interpreted.

That removes the need for remembering that to convert a returned
millisecond duration to a second duration.
2019-04-30 13:02:53 +03:00
8bf0e00b1c MXS-2329 Use duration with users_refresh_time 2019-04-30 13:02:53 +03:00
3055e49f5a MXS-2329 Use durations with query_retry_timeout
Also change auth_[connect|read|write]_timeout to be time_t.
2019-04-30 13:02:53 +03:00
92cc31f0c0 MXS-2329 Use durations with auth_[connect|read|write]_timeout 2019-04-30 13:02:53 +03:00
643514bbe4 Merge branch '2.3' into develop 2019-04-30 12:46:07 +03:00
dd188962cd MXS-2427 Check all hints when routing
Now considers other routing hints if first one fails. The order is inverted compared
to e.g. namedserver filter settings because of how routing hints are stored. If all hints
are unsuccessful, route to any slave.
2019-04-29 16:49:32 +03:00
ea14331d18 Move DCB owner selection into Listener
The code that selects which worker to assign the DCB to is now completely
in the Listener class. This removes the need to change the ownership of a
DCB after it has been allocated.
2019-04-26 13:18:37 +03:00
510cae2fe0 Allocate DCB on owning thread
The DCB is now fully allocated on the thread that owns it. This guarantees
that the owner is always correct when it is used.

The code in poll_add_dcb still manipulates which worker the DCB is
allocated. This needs to be removed and the detection of special needs
(maxadmin, maxinfo) must be moved into the listener.
2019-04-26 11:40:30 +03:00
01b1d469a8 MXS-2435 Handle recoverable Clustrix errors
If
- transaction replay is enabled,
- an error is returned and
- the error is one of the recoverable Clustrix errors
we will retry the transaction.

If it succeeds, then the client will not notice anything but
for a short delay.

Note that the error message is looked for irrespective of whether
the backend is Clustrix or not. However, as errors are not common
the price for doing that can probably be ignored.

However, a bigger problem is that explicit knowledge of different
backends should *not* be coded into routers.
2019-04-26 10:54:57 +03:00
d8a9405998 MXS-2435 Refactor error message extracting
Access to the error message is needed in different contexts.
Now the extraction code itself can be shared.
2019-04-26 10:54:57 +03:00
fadbc0b1ae Separate Monitor management to its own file
Allows better separation of file local data. Also allows moving monitor-
related code from config_runtime.cc.
2019-04-25 12:32:41 +03:00
07ea6bd9ba MXS-2450: Don't discard history if it's disabled
If the session command history is not enabled, it shouldn't be discarded
when a COM_CHANGE_USER is executed.
2019-04-25 11:49:01 +03:00
7a5f11b752 Fix wrong check for wsrep_ready
wsrep_ready was check for ON/YES/1/true, but it has to be checked for OFF/NO/0/false as we are removing nodes, not joining.
2019-04-25 07:45:09 +03:00
9f7a7e473e Enable galeramon to track wsrep_desync, wsrep_ready, wsrep_sst_donor_rejects_queries and wsrep_reject_queries 2019-04-25 07:45:09 +03:00
820ff756a7 Fix test_config2
The static structures referred to non-static data.
2019-04-24 18:01:28 +03:00
6aedcc085f Remove references to NDB server state 2019-04-24 14:15:56 +03:00
1e84742cbb Remove ndbclustermon 2019-04-24 14:02:18 +03:00
691dc4d1b6 Remove telnetd and debugcli
The modules were deprecated.
2019-04-24 14:01:31 +03:00
75c0ac5323 Move items from MonitorWorker to MonitorWorkerSimple
MonitorWorker only enforces the use of a worker thread but otherwise
does not define how the monitor is implemented.
2019-04-24 11:27:11 +03:00
2bc0b9c875 Don't ignore getcwd return value
The return value should be used.
2019-04-24 11:08:34 +03:00
4186f39616 Merge branch '2.3' into develop 2019-04-23 12:11:09 +03:00
9e3f0aab5a Extract client address before allocating the DCB
By extracting the address before the session is started, we can refuse the
connection if there are too many connections from that particular host.
2019-04-23 11:57:10 +03:00
d60ec9e281 Fix test_config2
If the /etc/maxscale.modules.d/ didn't exist or wasn't accessable by the
current user, the test would fail.
2019-04-23 11:57:10 +03:00
60c1b15d60 MXS-2441: Add slave support to galeramon
Slaves that replicate from galeramon now get the Slave status if they are
replicating from a joined Galera node.
2019-04-23 11:57:10 +03:00
ba79028a46 Add debug assertions into the core
The assertions make sure DCB writes and reads are only done by the thread
that owns them.
2019-04-23 11:46:38 +03:00
a8639c3226 Merge branch '2.3.6' into 2.3 2019-04-23 11:20:09 +03:00
24fc82e160 Move large query processing inside RWBackend
The knowledge of which function to call can be internal to RWBackend. This
make the use of the class easier as one can simply write to the backend.
2019-04-18 13:58:34 +03:00
3e41a601f8 MXS-2411: Implicitly use latest API version
The request API prefix is now simply ignored as it has no meaning as long
as there is a single version of the API.
2019-04-18 13:58:34 +03:00
a471417150 MXS-1922: Show GTIDs for Galera nodes
Galera generates GTIDs even if they are unique across all nodes and it
makes sense to display this.
2019-04-18 12:04:56 +03:00
03dc969cf2 Fix use-after-free in LocalClient
If the DCB was closed before the handshake for the LocalCliet connection
was received, the gw_decode_mysql_server_handshake would use the closed
DCB to log the connection ID. Clearing out the pointer prevents it.
2019-04-17 16:33:27 +03:00
3e04922565 MXS-2415: Fix client callbacks in arvorouter
The DCB callbacks shouldn't be used to send more events as they cause the
callback to be called recursively. The recursive calls caused rows to be
sent before the schemas for the rows were sent. Queuing the events via the
worker mechanism prevents this.
2019-04-17 16:07:05 +03:00
61f728c05a MXS-2433: Reduce default query classifier cache size
Reduced the default cache size from 40% to 15%. Most cases don't benefit
from that much memory and the defaults have caused problems in live
environments.
2019-04-17 16:07:04 +03:00
d13e6e56ee MXS-2433: Never cache multi-packet queries
If a query spans more than a single packet, it will never be successfully
classified due to the fact that the complete SQL is never available to the
query classifier. For this reason, it is pointless to cache them.
2019-04-17 16:07:04 +03:00
733dc491d9 Integrate Replicator into avrorouter
Took the Replicator into use in avrorouter as an alternative to the
binlogrouter based setup. This also allows the avrorouter to automatically
handle master failovers and to start replication from GTID coordinates.
2019-04-17 14:13:44 +03:00
7723e7c933 Add modified Replicator for avrorouter
Repurposed the Replicator from the CDC integration project as a
replication event processing service. It is similar to the CDC version of
the Replicator and is still in the same namespace but it lacks all of the
cross-thread communication that was a part of the integration project.
2019-04-17 14:13:44 +03:00
363bb5aa56 Update Connector-C to 3.1
Updated the connector to 3.1 as it adds support for the replication
protocol.
2019-04-17 14:13:44 +03:00
a4c6f3542a MXS-2315: Tokenized CS version extraction
The STL regex implementations have proven to be unreliable on older
systems and replacing the regex with hand-written code for version
extraction is less prone to break.
2019-04-17 11:17:33 +03:00
fb785d1afc Merge branch '2.3.6' into 2.3 2019-04-17 11:17:13 +03:00
d3bfe0a712 Fix handling of large result packets
The RWBackend didn't know to skip the tail end of large packets.
2019-04-17 11:16:16 +03:00
067660e3e7 Merge branch '2.3' into develop 2019-04-16 16:55:12 +03:00
2ca9337da1 Merge branch '2.2' into 2.3 2019-04-16 16:34:57 +03:00
8b29e70f63 MXS-2428 Allow fixed Clustrix configuration
If 'dynamic_node_detection' has been set to false, then the
Clustrix monitor will not dynamically figure out what nodes are
available, but instead use the bootstrap nodes as such.

With 'dynamic_node_detection' being false, the Clustrix monitor
will do no cluster checks, but simply ping the health port of
each server.
2019-04-16 13:58:27 +03:00