Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the new features of MySQL5.7

2025-02-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what are the new features of MySQL5.7". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the new features of MySQL5.7"?

Introduction to MGR

MySQL Group Replication (hereinafter referred to as: MGR) is a state machine replication based on Paxos protocol officially launched by MySQL. Before the advent of MGR, the common way of MySQL high availability for users, no matter how much the architecture was changed, was essentially the Master-Slave architecture. MySQL version 5.7 began to support lossless semi-synchronous replication (lossless semi-sync replication), which further indicates the strong consistency of data replication.

Comparison between MGR and other replication introduction to MySQL Asynchronous replication

The commit of a master transaction does not need to be confirmed by slave, and whether slave receives the binlog,master of master is not care. After receiving the master binlog, slave first writes the relay log, and finally asynchronously executes the sql application in the relay log to itself. Since the submission of master does not need to ensure that slave relay log is correctly accepted, when slave fails to accept master binlog or relay log application fails, master is not aware of it.

Assuming that master goes down and binlog has not had time to be received by slave, and the switching program promotes slave to a new master, there will be data inconsistencies! In addition, in the case of high concurrency, in the traditional master-slave replication, the slave node may have a large delay with the master (of course, subsequent versions of mysql have been optimized and parallel replication has been introduced to reduce the latency of asynchronous replication)

MySQL semi-synchronous replication

Based on the shortcomings of traditional asynchronous, mysql introduced semi-synchronous replication in version 5.5. It can be said that semi-synchronous replication is an improvement of traditional asynchronous replication. Before the commit of a master transaction, it is necessary to ensure that a slave receives the relay log and responds to the master before the transaction commit. However, the application of slave to relay log is still carried out asynchronously, as shown in the following figure:

A replication group consists of several nodes (database instances). Each node in the group maintains its own data copy (Share Nothing). Atomic messages and global ordered messages are realized through the consistency protocol to achieve the consistency of instance data in the group.

The features that MGR's solution now has

Data consistency guarantee: ensure that most nodes in the cluster receive logs

Multi-node write support: all nodes in the cluster can write in multi-write mode

Fault Tolerance: make sure that the system failure (including cerebral fissure) is still available and that double write does not affect the system.

Current impact of MGR's solution

Only InnoDB tables are supported, and each table must have a primary key for conflict detection of write set.

The GTID feature must be turned on, and the binary log format must be set to ROW, which is used to select master and write set.

COMMIT may cause failures, similar to failure scenarios at snapshot transaction isolation level

Currently, a MGR cluster supports up to 9 nodes.

Does not support foreign keys in save point features, can not do global constraint detection and partial rollback

Binary log does not support binlog event checksum

Thank you for your reading, the above is the content of "what are the new features of MySQL5.7". After the study of this article, I believe you have a deeper understanding of what new features of MySQL5.7 are, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report