Commit Graph

12045 Commits

Author SHA1 Message Date
aa8546ca80 MXS-2107: Prevent moving of client DCBs with poll_add_dcb
When a DCB is removed and added more than once with poll_add_dcb and
poll_remove_dcb, the code previously chose a different thread each time
the DCB was added. This violated the assumption is that all DCBs are local
to a single worker.
2018-10-20 11:53:57 +03:00
a8eda7342f Make writeqlen and others uint64_t
This prevents them from overflowing with buffered results larger than can
be expressed with 32 bits.
2018-10-20 11:53:57 +03:00
f461ab428e Fix backend DCB writeq throttling
The callbacks iterated over all threads when only the local ones must be
iterated. This prevents a deadlock from occurring when multiple threads
start throttling at the same time.

Also fixed the gwbuf_append debug assertion.
2018-10-20 11:53:57 +03:00
4be5d9267d Fix writeq_high_water and writeq_low_water
The parameters were never read at startup and could not be modified at
runtime. Also the values were only read once at startup.
2018-10-20 11:53:57 +03:00
d89cfc1810 Fix crash on KILL
Only backend DCBs should get processed by the callback.
2018-10-20 11:53:57 +03:00
0862c724d8 Fix writeq_low_water
The value was never updated. Also amended the documentation to point out
that the parameter accepts size type values.
2018-10-20 11:53:57 +03:00
262f1d7e47 Fix build failures
The freopen return value caused warnings.
2018-10-19 15:20:34 +03:00
192563a947 MXS-2108: Fix open connection calculation
When a connection to a server is lost and the session command history is
disabled, the session will continue as long as at least one connection is
open. Previously the open connection calculation used the same code that
was used when a new session was created which only inspected the
configured server count instead of the actual open connection count.
2018-10-19 15:20:34 +03:00
6d00dbfc92 Fix mxs2043_select_for_update
Explicitly define the host of the user being created and sync
replication after it.
2018-10-19 15:18:16 +03:00
7d03bee648 Add type formatting helpers
Created the <maxbase/format.hh> header that contains various helper
functions for formatting values into human readable forms. Currently only
binary to human readable size conversion is implemented.
2018-10-19 11:20:29 +03:00
6045c90bf0 Log query classifier cache size on startup 2018-10-19 11:20:29 +03:00
5a87748153 MXS-2090 Update 2.3.1 release notes 2018-10-19 08:03:11 +03:00
8d60bd04d2 MXS-2090 Update documentation 2018-10-19 08:03:11 +03:00
0e2e74d1e1 MXS-2090 Extend test program
Now the same tests are run, first using GTID replication, then
file + position replication.
2018-10-19 08:03:11 +03:00
8a0805d264 MXS-2090 Drop requirement that GTID based replication is used
Drop the requirement that GTID based replication is used for
the BinLog Galera "failover" mechanism. There is no reason for
that restriction; it works just as well with file+position based
replication.
2018-10-19 08:03:11 +03:00
f8cf5053bd MXS-2103: Fix CREATE TEMPORARY TABLE detection
The table creation was not detected as the function used to extract the
table name did not return the fully qualified names. Even if it did return
a fully qualified name, it wouldn't have been correctly processed.
2018-10-18 20:26:58 +03:00
457d0c21dd Document error code and SQL state for blocked queries
If the dbfwfilter blocks a query a specific error is returned. This was
not documented and is needed to detect errors sent by the filter.
2018-10-18 02:02:14 +03:00
230345c98c Fix on_queries documentation
The combination of values was not documented.
2018-10-18 02:02:14 +03:00
9e942f1a48 Add warning for deprecation of server weights 2018-10-17 14:10:57 +03:00
6e43a900c6 Fix keepalived_masterdown
Backends use gtid-replication and the test is faster.
2018-10-16 16:09:38 +03:00
36b666898c Fix connection merging
The conditional was inverted.
2018-10-16 16:09:38 +03:00
e0c46a9c9a Initialize server version string
Could read uninitialized data.
2018-10-16 16:09:38 +03:00
f518b38364 Initialize disk_space_checked
Was reading an uninitialized value.
2018-10-16 16:09:38 +03:00
2d61b78439 Fix low disk space maintenance
The setting didn't work because the code updated a status flag which
would be overwritten before being read. Also, promotion code now checks
that the server is not in maintenance.
2018-10-16 16:09:38 +03:00
0c203fa02d Don't redirect duplicate connections
The redirection method checks if a slave connection to the redirection
target already exists. If so, the connection is not modified. Also, failover
better detects duplicate connections during promotion.
2018-10-16 16:09:38 +03:00
e930270b9c Use copy when checking removed connections
The function modifies the reference parameter contents indirectly.
2018-10-16 16:09:38 +03:00
f554ef770b Allow switchover for arbitrary topologies
The demoted server no longer needs to be the master.
2018-10-16 16:09:38 +03:00
0cf8ea43f7 Redirect slaves of promotion target
This affects situations where the promoted server is a relay or multimaster
group member.
2018-10-16 16:09:38 +03:00
20af9afb49 Merge branch '2.2' into 2.3 2018-10-16 11:10:48 +03:00
c3cd119454 Speed up mm test
The test did not use the wait_for_monitor function to sync with the
monitor. This function speeds up the testing greatly by removing
unnecessary sleeps from it.

Also reduced the amount of data inserted into the cluster. There's no real
need to test with large amounts of data as it is only a functional test.
2018-10-16 11:06:06 +03:00
92057f6ff9 Add more logging to readwritesplit
When a read-only transaction fails due to a connection error, no message
would be logged. Also added an info level message for the case when a
backend connection would get closed before the session is in the correct
state and a debug assertion that the router session should never be closed
when the handleError method is called.
2018-10-16 11:04:57 +03:00
de653437b2 Document server priority behavior
If all of the candidate servers have the same priority, the server that is
first listed in the servers parameter is chosen.
2018-10-16 11:04:57 +03:00
a2ef874fe6 Fix max_sescmd_history documentation
The session commands are now always stored but they are stored as
references. Also clarified that the feature was disabled in older
versions.
2018-10-16 10:59:14 +03:00
2f76c48b06 Clarify server version error message
The required server version is now printed.
2018-10-11 11:41:46 +03:00
c0945020ee Only running slave connections are checked for non-gtid replication
This prevents auto-failover from being disabled due to recently generated or
non-functional slave connections.
2018-10-11 11:41:46 +03:00
f2067fcf7c Monitor cleanup
Removes unused code, compacts lines, moves code.
No functional changes.
2018-10-11 11:39:05 +03:00
c68d0e36c7 Merge branch '2.3.0' into 2.3 2018-10-11 11:22:07 +03:00
1c70273cb7 Fix typo in 2.3 upgrading document 2018-10-11 11:21:25 +03:00
49a61db09e Merge branch '2.3.0' into 2.3 2018-10-11 11:12:43 +03:00
6170a2193d Merge branch '2.2' into 2.3 2018-10-11 11:12:31 +03:00
5906e28a2c Clarify namedserverfilter documentation
The example configuration had wrong server names.
2018-10-11 10:42:09 +03:00
2ac4df7772 Remove empty heading 2018-10-11 10:40:55 +03:00
f9e4837f44 Add note of maxadmin list threads to release notes 2018-10-11 10:38:15 +03:00
9a939d3fba Update MaxAdmin documentation
'show threads' documentation was completely out of date.
2018-10-11 10:20:07 +03:00
c7f07ec6b1 Add Upgrading document 2018-10-11 10:20:07 +03:00
6c1486ed06 Fix cache release notes note 2018-10-11 10:20:07 +03:00
4659c45a6b Updated release notes of MariaDBMonitor
One added feature was missing. Also added some links.
2018-10-10 18:32:46 +03:00
d0444ff054 SlaveStatus::to_short_string() uses member field
The owner server name is now stored in a field.
2018-10-10 17:26:48 +03:00
2f1512a22d Cleanup slave connection removal during promotion/demotion
The removing and slave status updating is now separated to a function.
As the MariaDBServer object now contains the updated slave connections,
keeping track of removed connections is no longer required.
2018-10-09 14:29:49 +03:00
c10fab977d Cleanup slave connection copy & merge
The two cases are now separated. In switchover, the promotion and
demotion targets can swap connections between each other without worry.
In failover, the two connection lists must be merged semi-intelligently.

The slave connections of the two servers are now saved to the operation
descriptor object at the start of the operation. This allows slave status
updating during the operation.
2018-10-09 14:29:49 +03:00