Commit Graph

7490 Commits

Author SHA1 Message Date
8500a980ac Update events bitmap in poll_waitevents
This information is also generally applicable for all
poll event handlers, not just DCB. The state of the thread
is already set in poll_waitevents().
2017-04-20 13:51:16 +03:00
1e47c4aa50 Move stats-collecting to poll_waitevents()
If the stats-collecting is performed in poll_waitevents() then it
will be collected for all kinds of sockets (when other that DCB
ones can be added).
2017-04-20 13:51:16 +03:00
63141bb191 WIP: Allow the adding of any fds to the poll set
This is just a first step in a trial that will allow the addition
of any file descriptor to the general poll mechanism and hence
allow any i/o to be handled by the worker threads.

There is a structure

  typedef struct mxs_poll_data
  {
      void (*handler)(struct mxs_poll_data *data, int wid, uint32_t events);
      struct
      {
          int id;
      } thread;
  } MXS_POLL_DATA;

that any other structure (e.g. a DCB) encapsulating a file descriptor must
have as its first member (a C++ struct could basically derive from it).

That structure contains two members; 'handler' and 'thread.id'. Handler is a
pointer to a function taking a pointer to a struct mxs_poll_data, a worker thread
if and an epoll event mask as argument.

So, DCB is modified to have MXS_POLL_DATA as its first member and 'handler'
is initialized with a function that *knows* the passed MXS_POLL_DATA can
be downcast to a DCB.

process_pollq no longer exists, but is now called process_pollq_dcb. The
general stuff related to statistics etc. will be moved to poll_waitevents
itself after which the whole function is moved to dcb.c. At that point,
the handler pointer will be set in dcb_alloc().

Effectively poll.[h|c] will provide a generic mechanism for listening on
whatever descriptors and the dcb stuff will be part of dcb.[h|c].
2017-04-20 13:51:16 +03:00
5704ae5ffd Allow paths to be created if they don't exist
A module can now declare a path parameter for a directory that does not
yet exist. If the directory does not exist, MaxScale will create the
directory with the requested permissions.
2017-04-20 13:26:16 +03:00
33b809eec1 Do not build storage_rocksdb by default 2017-04-20 13:12:46 +03:00
bda8c478e7 Merge pull request #124 from mariadb-corporation/2.1-doc-markusjm
2.1 documentation update
2017-04-20 12:07:31 +03:00
7d7ad54482 Update Upgrading-To-MaxScale-2.1.md
Added information about IPv6 changes and persisted configurations.
2017-04-20 10:21:02 +03:00
83f76d0655 Update MaxAdmin.md
Updated the output of the executed commands.
2017-04-20 10:07:58 +03:00
ce95983896 Update MaxAdmin runtime configuration documentation
The example help output for the commands is now shown in the
documentation.
2017-04-20 09:37:29 +03:00
49bef4e4f0 Delete How-errors-are-handled-in-MaxScale.md 2017-04-20 09:27:24 +03:00
c0b3c7eb9f Update Hint-Syntax.md 2017-04-20 09:27:24 +03:00
03ba0391e1 Update Debug-CLI.md 2017-04-20 09:27:24 +03:00
1fc4490d40 Update ReadConnRoute.md 2017-04-20 09:27:24 +03:00
def475be18 Update Avrorouter.md 2017-04-20 09:27:24 +03:00
f2a0dbd72d Update Binlogrouter.md 2017-04-20 09:27:24 +03:00
9d56fc70f6 Update SchemaRouter.md 2017-04-20 09:27:24 +03:00
767ec74489 Update MySQL-Replication-Connection-Routing-Tutorial.md 2017-04-20 09:27:24 +03:00
94acc9b9ab Update MaxScale-HA-with-Corosync-Pacemaker.md 2017-04-20 09:27:24 +03:00
afe75e9006 Update Simple-Sharding-Tutorial.md 2017-04-20 09:27:23 +03:00
1e34bd7642 Update Notification-Service.md
Removed change history, changed company name.
2017-04-20 09:27:23 +03:00
e4941044aa MXS-1209: blr_slave_query cleanup
New routine: blr_handle_set_stmt is in use
2017-04-19 18:04:41 +02:00
c3cfc86a7b Merge branch '2.1' into develop 2017-04-19 18:19:13 +03:00
7989473fbd MXS-1221: Nagios plugin scripts does not process -S option properly
Nagios plugin scripts does not process -S option properly
2017-04-19 18:18:04 +03:00
d03b059107 Cache length of buffered data
If a complete response is delivered in many buffers, then calling
gwbuf_length() whenever you need the complete size starts to hurt.
By caching the length of the data received sofar and by updating
the length in clientReply(), gwbuf_length() will be called exactly
once for each buffer(chain) delivered to routeQuery().
2017-04-19 18:15:56 +03:00
27e97a546d Remove superfluous logging
Just because of a debug build you do not want the transaction
parser to log.
2017-04-19 18:15:56 +03:00
5998457142 MXS-1227: Update Nagios Plugins for MaxScale 2.1
Nagios Plugins update for MaxScale 2.1
2017-04-19 16:10:14 +02:00
aa3559c6e9 MXS-1209: blr_slave_query cleanup
new routine: blr_handle_show_stmt
2017-04-19 16:02:07 +02:00
e09f1db4a6 MXS-1209: blr_slave_query cleanup
new routine: blr_handle_maxwell_stmt
2017-04-19 14:11:59 +02:00
3b4fdbcf32 Fix compilation error 2017-04-18 14:53:12 +03:00
a54d6fe816 Add connector plugindir to help output
The output now displays the connector directory.
2017-04-13 17:57:52 +03:00
f4a5134a83 MXS-1212: use res.length for buffer length instead of computing the size of the whole buffer chain
This reduces CPU usage and decreases the response time for result sets
with many rows.
2017-04-07 12:16:50 +02:00
dfede32266 Add cast int->uint64_t
Needed for compiling on Centos6.
2017-04-06 13:00:30 +03:00
9e8ddc842c Fix leaks in testconfig 2017-04-06 12:51:09 +03:00
e0a12820b6 Binlogserver sends GTID_LIST Fake Event when a MariaDB 10 slave connects with GTID
Now sending GTID_LIST Fake Event when a MariaDB10 Slave connects with
GTID
2017-04-06 09:04:19 +02:00
ce6b52ab39 Rename schemarouter internal functions
Renamed the functions to better describe what they do.
2017-04-06 09:22:21 +03:00
c37c5abfeb Use collectable resultset type for database mapping
When the databases are mapped, it is desirable to get the complete
response in one contiguous buffer. This removes the need to manually
process the partial packets in the router code.
2017-04-06 09:22:21 +03:00
2310381465 Make variables of Backend private
The variables are no longer directly manipulated by the session level
code.
2017-04-06 09:22:21 +03:00
0d7f987598 Move state checks inside the Backend class
The class now has methods to query its internal state.
2017-04-06 09:22:20 +03:00
0fde5f22df Use C++0x explicitly
Using C++0x instead of the actual C++11 standard allows older systems to
use the Technical Report additions in pre-C++11 compilers.
2017-04-05 19:46:49 +03:00
15951423d8 Fix memory errors in test_poll and test_queuemanager
test_poll was calling poll_init() two times since it's already included in
init_test_env().

test_queuemanager was missing a bunch of frees. This doesn't fix it completely,
but removes most of the leaks and valgrind errors.
2017-04-05 17:37:21 +03:00
b1f66d21c8 Fix valgrind-errors in test_filter and test_modutil
Reduces valgrind clutter quite a bit.
2017-04-05 15:04:36 +03:00
ad1c05b015 Merge branch '2.1' into develop 2017-04-05 11:35:13 +03:00
2d987b25b2 Fix test_dcb
Set threadcount to one, don't check validity after freeing.
2017-04-05 10:49:43 +03:00
e0a98f6539 Fix calls of pcre2_substitute
If the output buffer given to pcre2_substitute is too small, an error
value is written to the last parameter (output length). That value
should not be used for calculations. This patch gives a copy as
parameter instead.

Coincidentally, this commit fixes the crashes of query classifier tests.

Also, increase buffer growth rate in utils.c.
2017-04-04 16:19:21 +03:00
dca086571b TestMaxScalePCRE2: Fix memory leaks
Not really leaks, but this reduces needless clutter in the valgrind
output.
2017-04-04 16:18:47 +03:00
872f69b681 Also check IPv6 mapped IPv4 addresses as IPv4
If a client connects from an IPv4 address, but the listener listens on an
IPv6 address, the client IP will be a IPv6 mapped IPv4 address
e.g. ::ffff:127.0.0.1. A grant for an IPv4 address should still match an
IPv6 mapped IPv4 address.
2017-04-04 15:28:39 +03:00
9f14f3659f Only check user permissions on startup
When users were loaded, the permissions for the service user were
checked. The conditional that makes sure the check is executed only at
startup was checking the listener's users instead of the SQLite handle
which caused all reloads of users to check the permissions.
2017-04-04 15:28:39 +03:00
860b14526c Fix mxs_mysql_is_result_set
The function assumed that the packet payload was always at least two
bytes.
2017-04-04 15:28:39 +03:00
1ff83150f0 Revert "Route statements in larger batches"
This reverts commit f3c83770903151a0a3b53593c3e05fa0af94cd5f. The
functionality was used implicitly by modules that declare the
RCAP_TYPE_CONTIGUOUS_OUTPUT capability.
2017-04-04 09:56:51 +03:00
0c3f9ffa2e Maxrows: documentation update and use of MXS_MODULE_PARAM_SIZE for max_resultset_size parameter
max_resultset_size parameter now uses MXS_MODULE_PARAM_SIZE and
config_get_size

Documentation change follows the change.
2017-04-04 08:43:55 +02:00