Commit Graph

11034 Commits

Author SHA1 Message Date
1aa5dcf659 Do rsync without --delete
rsync with the --delete flag will destroy artifacts generated by other
jobs. This broke the build_all job.
2018-07-04 15:41:18 +03:00
6b9ae5b220 Fix bug626
Removed the excessive comments in favor of a simplified description. Use
stack-allocated TestConnections and simplify assertions.

The main change is the different SQL used to update the user with the old
password. Direct modification of the `mysql`.`user` database isn't very
neat but it guarantees that the value is updated.
2018-07-04 15:41:17 +03:00
d98ffb5d0a Always stop MaxScale before test
The test should stop MaxScale at the start unless the manual debug flag is
given on the command line. This fixes the connection failure of mxs1719
but reveals a problem with the filter itself.
2018-07-04 13:51:10 +03:00
88431f14d7 Fix cache_basic configuration
The test requires the old default values.
2018-07-04 13:51:10 +03:00
3f9a204116 Log unknown users and wrong passwords separately
If authentication fails due to a wrong password, a different error message
is logged. This should help resolve problems with user management.
2018-07-04 13:51:09 +03:00
be7d31c6ff Update 2.2.11 release notes
Added fixed bugs to release notes, fixed documentation links.
2018-07-04 13:51:09 +03:00
79acbae4e5 Fix cache test build failure
The change in defaults caused the test to fail.
2018-07-04 13:51:09 +03:00
05e8773161 fix typo in chmod for all binary repository dirs and files 2018-07-04 09:11:32 +03:00
afdf28c0b9 Access rights for binary repository files and dirs (#178)
fix typo in chmod for all binary repository dirs and files
2018-07-04 09:08:55 +03:00
44ef4912e8 Merge branch '2.2' into develop 2018-07-03 21:13:41 +03:00
45752e0a45 chmod for all binary repository dirs and files 2018-07-03 16:14:09 +03:00
b98c0841b4 Enable and fix -Wextra warnings
Fixed all warnings that were present with -Wextra.
2018-07-03 15:07:19 +03:00
fb1c28c702 MXS-1948: Do round-robin worker assignment
Due to the skewed accept distribution without SO_REUSEPORT, we use
round-robin assignment of workers for new client connections. This
provides better performance as work is more likely to be evenly
distributed across all threads.

Using a least-busy-worker algorithm would provide a more stable result but
this is not trivially simple to implement. For this reason, the
round-robin based approach was chosen for 2.2.
2018-07-03 12:49:59 +03:00
e455e7f15d MXS-1953: Always initialize the GWBUF spinlock
The spinlock in the buffer is used but it was not always initialized. Also
added missing initialization of the SERVER pointer.
2018-07-03 11:32:36 +03:00
34f61bc4f2 Close connections before starting loop
The connections should be closed after the check queries.
2018-07-03 10:32:06 +03:00
7ded2c436f Fix monitor shutdown and restart
Monitor restart was not working.
2018-07-03 10:32:06 +03:00
03491a45f0 Remove old code
The functionality is elsewhere.
2018-07-03 10:32:06 +03:00
013dfa79aa Quote whitespace-only default values
Parameters that accept whitespace-only values need to have their default
values quoted if they contain only whitespace characters. In 2.2 the
qlafilter is the only module that did not do this.
2018-07-03 03:09:19 +03:00
a1ab09a79f Reduce test verbosity
When a test is checking the status of the nodes, the output is relatively
verbose.

Also changed dropping of users to use the IF EXISTS syntax. This will
remove the errors if the users do not exist.
2018-07-03 02:08:25 +03:00
ceb1c0f2a4 MXS-1950: Add missing error messages
When a valid target was not found, no error message was logged by the
router. This would cause the "Routing the query failed. Session will be
closed." message to be logged with no explanation as to why the routing
failed.

In addition to the above-mentioned case, no message would be logged if the
target for a COM_STMT_FETCH was not in use.
2018-07-03 02:08:25 +03:00
4084bbcaca Remove obsolete documents
The documents haven't been updated since the 1.0 release.
2018-07-03 02:08:25 +03:00
ed068f4d93 Expand authentication failure log message
If the authentication failure was due to a missing database, this extra
information can be logged. This will help cases where users are using
databases that do not exist.
2018-07-03 02:08:24 +03:00
d96a8b1773 Remove call to pingCluster with only one server
If only one server is used, the amount of requests can be reduced from a
minimum of two to a minimum of one. In most cases this cuts down the
response time in half.
2018-07-03 01:58:43 +03:00
fd31c9cced MXS-1905 Set slaves with low disk space to maintenance
Also, servers in maintenance are updated just as other servers.
2018-07-02 14:24:57 +03:00
8d7cb27884 Remove faulty debug assertion
The debug assertion was missing the check for the queued commands.
2018-07-02 13:29:21 +03:00
9d5b8c8de2 Share data between identical session commands
If two or more session commands contain identical buffers, the buffer of
the first session command is shared between the others. This reduces the
amount of memory used to store repeated executions of session commands.

The purging of session command history in readwritesplit was replaced with
session command de-duplication. This was done to prevent problems that
could arise when the order of session commands plays a significant role.
2018-07-02 13:29:21 +03:00
295d59881e Remove spinlocks from GWBUF
The spinlock does not protect from or prevent misuse as buffers must not
be used concurrently by multiple threads.
2018-07-02 13:29:21 +03:00
709c394064 Remove debug messages from readwritesplit
The debug log messages weren't very useful and the information that they
contained can be deduced from other messages.
2018-07-02 13:29:21 +03:00
df3deb25cb Clean up mxs812_1
Use stack allocated objects, reduce the iteration count and the amount of
sent data (now roughly 10MB in total).
2018-07-02 13:29:20 +03:00
8b736854e8 Assert that backend is used or can be connected to
The assertion that was added to RWSplitSession::handle_slave_is_target
failed when delayed_retry was enabled or when slave reconnection
occurred. In 2.3, targets returned by the target selection functions do
not need to be in use but they must be valid connection targets.
2018-07-02 13:29:20 +03:00
9c6cc713c8 Remove unnecessary session command logging
All executed session commands were logged in the RWSplitSession
destructor. This is not really necessary and shouldn't have been placed
there in the first place.
2018-07-02 13:29:20 +03:00
8cf22dbb56 MXS-1549: Prevent optimistic transaction with no slaves
If the router session does not have an already open slave connection,
optimistic transactions are not attempted.
2018-07-02 13:29:19 +03:00
0911c664b1 MXS-1549: Add basic test case
Added a basic test case that checks that the functionality works as
expected.
2018-07-02 13:29:19 +03:00
56f274d74a Add Connection helper class
This is intended to make querying a "server" easier by wrapping common
functionality into one class.
2018-07-02 13:29:19 +03:00
12398bfc26 MXS-1549: Implement optimistic transaction execution
When the `optimistic_trx` mode is enabled, all transactions are started on
a slave server. If the client executes a query inside the transaction that
is not of a read-only nature, the transaction is rolled back and replayed
on the master.
2018-07-02 13:29:19 +03:00
391618d53b MXS-1549: Add documentation for optimistic_trx
Added parameter documentation and explained the limitations it has.
2018-07-02 13:29:18 +03:00
af45006567 MXS-1549: Add optimistic_trx parameter
The optimistic_trx parameter will control whether transactions are assumed
to be read-only and will be optimistically executed on slave
servers. Currently, the parameter does nothing.
2018-07-02 13:29:18 +03:00
d6a964304b MXS-1549: Always store previous target
Unconditionally update the previous target on each routed query. This
allows routing to the previous server in case it is needed. One example of
this is a new type of hint that allows routing to the same server where
the previous query was sent.

Also added a minor clarifying comment to the resetting of the
current_query.
2018-07-02 13:29:18 +03:00
a417567a18 Format readwritesplit with Astyle
Formatted readwritesplit with Astyle. Changed the initialization of
Backend::m_modutil_state to use curly braces to cope with Astyle's lack of
support for curly braces inside parentheses.
2018-07-02 13:29:18 +03:00
e610b285b9 MXS-1549: Count RO and RW transactions in readwritesplit
Readwritesplit now keeps track of how many read-only and read-write
transactions have been executed. This allows a coarse estimation of how
widely read-only transactions are done even without explicit read-only
transactions being used (i.e. START TRANSACTION READ ONLY).
2018-07-02 13:29:17 +03:00
b59f607471 MXS-1549: Track transaction type in the query classifier
The characteristics of a transaction can now be tracked by the query
classifier. This allows read-only and read-write transaction statistics to
be calculated.
2018-07-02 13:29:17 +03:00
ccdbfa8997 Fix test compilation failures
The tests failed to compile due to invalid use of try_query. For some
reason this wasn't detected by newer compilers.

Also fixed the compilation failure of mxs1713_lots_of_database on CentOS
7.
2018-07-02 12:45:57 +03:00
75c5a5dca5 Merge branch '2.2' of github.com:mariadb-corporation/MaxScale into 2.2 2018-07-02 12:31:31 +03:00
b0902402b6 MXS-1940 Turn cache filter non-experimental
Also change the following defaults:

- "selects": Was "verify_cacheable", is now "assume_cacheable"
- "cached_data": Was "shared", is now "thread_specific"
2018-07-02 08:44:39 +03:00
fa83901d03 Silence routing failure warnings when retrying queries
If a routing failure happens while a query can still be retried, it should
not be logged.
2018-06-30 19:26:24 +03:00
ee98ce1ee8 Expand mxs1507_trx_replay
Handle the problematic transaction with session command as well as empty
transactions. Also changed test to use wait_for_monitor as well as pass
the value to check as a parameter to the `check` function.
2018-06-30 19:26:23 +03:00
93fdada534 Fix crash on trx replay with session command
Readwritesplit would crash with the following transaction:

    BEGIN;
    SET @a = 1; -- This is where it would crash
    COMMIT;

When a session command was a part of the transaction, empty queries
(i.e. NULL GWBUFs) would be added to the transaction. If the transaction
were to be replayed, MaxScale would crash when these NULL queries were
executed.

Once the empty responses were fixed, the replaying of the transaction
would fail with a checksum mismatch. This was caused by the wrong order of
processing in RWSplitSession::clientReply. The response processing for
session commands was done after the response processing for replayed
transactions. This would trigger a checksum comparison too early for the
transaction in question.
2018-06-30 19:26:23 +03:00
9737962add Add printf attribute to all variadic functions
The test methods that take printf style input now have the printf
attribute. This enables format checks making oversights less likely.

Also fixed any existing errors in the code. Only the one in
test_binlog_fnc.cpp would've had an actual effect.
2018-06-30 19:26:23 +03:00
db81ba0005 set proper access rights for binary repo directory 2018-06-29 17:45:11 +03:00
a59c0c61ce Remove depth field from SERVER
It was not really used anymore.
2018-06-29 10:54:34 +03:00