Semi-sync Replication is a plugin
available for mysql which allows you to create more durable
replication topologies. For instance you can ensure that in
the event of a master crash that at least one of your replicas
has all transaction currently written to the master so that when
you promote, you know you're not missing any data.
That's a huge simplification.
What's the downside? Write speed. If a transaction on
your master have to wait until a replica acknowledges it has that
transaction, then there is going to be some delay. Not only
that, but your network latency between the two points matters a
lot. If you want greater durability, the cost is
performance.
It's important to note that the master doesn't wait until the
replica actually runs the transaction on the …
For the impatient:
# echo -e "deb http://repo.mysql.com/apt/debian/ stretch mysql-5.7\ndeb-src http://repo.mysql.com/apt/debian/ stretch mysql-5.7" > /etc/apt/sources.list.d/mysql.list # wget -O /tmp/RPM-GPG-KEY-mysql https://repo.mysql.com/RPM-GPG-KEY-mysql # apt-key add /tmp/RPM-GPG-KEY-mysql # apt update # apt install mysql-server
In the latest stable version of Debian, if you ask to install mysql-server, you now get installed mariadb automatically, with no (evident) way of installing Oracle’s MySQL. Any major version upgrade has to be done carefully (not only for MariaDB, but also for MySQL and Postgres), and I bet that a MySQL 5.5 to MariaDB 10.1 will cause a huge confusion. Not only it will fail user expectations, I think this will cause large issues now that MariaDB has chosen to become a “hard” fork, and become incompatible in many ways with MySQL. Not only the server upgrade will cause user struggle, the connector is …
[Read more]This blog continues the investigation into possible data races in the MySQL server reported by the Thread Sanitizer. The previous blog investigated several possible data races that were detected when the MySQL server is initialized. This blog investigates three data races in the performance schema that are reported when the MySQL server is shut down. The first data race is a racy increment of thread statistics. The second data race is a problem that may leave the state of the performance schema memory allocator incorrect. The final data race is in the lock …
[Read more]The MySQL server is a large multi-threaded program primarily written in the C++ programming language. Unfortunately, data races and deadlocks in concurrent C++ programs are common. Fortunately, the Thread Sanitizer can be used to find data races and deadlocks. MySQL 5.7 does not support the Thread Sanitizer, but is is easy to add to the MySQL configuration using a simple build procedure. When MySQL 5.7 is built with the Thread Sanitizer and database …
[Read more]
MySQL 5.7 supports the Address Sanitizer, which checks for several memory
related software errors including memory leaks. It is
really nice to see support for the Address Sanitizer built into
MySQL. Unfortunately, when running the mysql tests included
in MySQL 5.7.9, the Address Sanitizer reports
several memory leaks, which causes some of the tests to
fail. Here are some of the memory leaks in the MySQL 5.7.9
software found by the Address Sanitizer.
Memory leaks in 'mysqlbinlog'Several of the 'mysqlbinlog' tests
fail due to memory leaks in the 'mysqlbinlog' client program.
Here are the details from the ' …
Valgrind's helgrind tool identifies data races and lock
deadlocks in multi-threaded programs. Since the MySQL
server is a multi-threaded program, can helgrind find any issues
in the MySQL server?
A simple test that does nothing except start up the MySQL server
and shut it down is run on the MySQL test suite with memcheck and with helgrind. For this simple test
on MySQL 5.7.7, the memcheck run is nice and
clean but the …
The MySQL 5.7.6 release notes describe a
change to the binary log group commit algorithm that
can improve the performance of write intensive applications when
the binary log is enabled (noted with Bug #19424075). This
change is probably inspired by the experiment reported
in MySQL bug #73202.
There is a long history of tweaking the binary log group commit
algorithm and the InnoDB storage engine to scale performance.
Mark Callaghan describes the work done on this problem at Facebook. …
MySQL recently added support for JSON data with MySQL 5.7.8. It would be cool to store
JSON data in TokuDB tables.
First, I had to get TokuDB running on MySQL 5.7.8. TokuDB currently runs on
Percona Server 5.6, and various flavors of MariaDB. The
only issues porting TokuDB to MySQL 5.7 were adopting the
changes to various internal APIs that storage engines use.
Since I did not make any patches to the MySQL code,
some TokuDB features including clustered secondary keys and
selection of various compression algorithms …
While doing some testing (that I published later here) on the still-in-development MySQL 5.7 I wanted to do some analysis on the configuration to see if the changes in performance were due to the code changes or just to the new MySQL defaults (something that is very common in the migration from 5.5 to 5.6 due to the default transaction log size and other InnoDB parameters). This is a quick post aiming to identify the global variables changed between these two versions.
You could tell me that you could just read the release notes, but my experience (and this is not an exception, as you will see) …
[Read more]