Skip to content

Commit a43d597

Browse files
committed
Remove all non-English characters
1 parent d45049d commit a43d597

14 files changed

+320
-320
lines changed

Appendix.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Profile-Guided Optimization (PGO) is a compiler technique that uses profiling da
203203
204204
**24 Read Committed Isolation Level**
205205
206-
Put simply, the Read Committed isolation level ensures that any data read during a transaction is committed at the time of reading. It prevents the reader from seeing uncommitted or 'dirty' data. However, it doesn¡¯t guarantee that if the transaction reads the same data again, it will be the same; the data can change after being read.
206+
Put simply, the Read Committed isolation level ensures that any data read during a transaction is committed at the time of reading. It prevents the reader from seeing uncommitted or 'dirty' data. However, it doesn't guarantee that if the transaction reads the same data again, it will be the same; the data can change after being read.
207207
208208
**25 Replication**
209209
@@ -285,7 +285,7 @@ MySQL uses the classic request-response model: clients send SQL queries to the M
285285
286286
![](media/f3b8490d4e41a8da5e954aabf0a4aacf.png)
287287
288-
Here¡¯s how MySQL Server processes a SQL request with a detailed example. Suppose a user sends the following SQL statement from a MySQL client to MySQL Server:
288+
Here's how MySQL Server processes a SQL request with a detailed example. Suppose a user sends the following SQL statement from a MySQL client to MySQL Server:
289289
290290
```
291291
select name from student where id=1;
@@ -369,14 +369,17 @@ The execution plan for this SQL query can be viewed using the *'explain'* statem
369369
370370
The execution process with an index is as follows:
371371
372-
1. The executor requests the storage engine to locate the first index record matching the query condition (e.g., name LIKE 'wang%').
373-
2. The storage engine retrieves and returns the matching index record to the Server layer.
374-
3. The executor checks if the record meets the additional query conditions (e.g., id \< 3).
372+
1. The executor requests the storage engine to locate the first index record matching the query condition (e.g., name LIKE 'wang%').
375373
376-
If conditions are met, the corresponding name is added to the network buffer, unless it is full. If conditions are not met, the executor skips the record and requests the next one from the storage engine.
374+
2. The storage engine retrieves and returns the matching index record to the Server layer.
377375
378-
4. This cycle continues as the executor repeatedly requests and evaluates the next index record that matches the query condition until all relevant index records are processed.
379-
5. Once the storage engine indicates that all relevant index records have been processed, the executor exits the loop and sends the collected results to the client.
376+
3. The executor checks if the record meets the additional query conditions (e.g., id \< 3).
377+
378+
If conditions are met, the corresponding name is added to the network buffer, unless it is full. If conditions are not met, the executor skips the record and requests the next one from the storage engine.
379+
380+
4. This cycle continues as the executor repeatedly requests and evaluates the next index record that matches the query condition until all relevant index records are processed.
381+
382+
5. Once the storage engine indicates that all relevant index records have been processed, the executor exits the loop and sends the collected results to the client.
380383
381384
Using an index allows the storage engine to quickly locate necessary records, bypassing the need to scan the entire table. In general, this significantly improves execution efficiency and speeds up the query.
382385

Chapter1.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ Here are some classic problems listed, along with typical resolutions in real-wo
1414

1515
The following figure illustrates the relationship between TPC-C throughput and concurrency in MySQL 5.7.39 under a specific configuration. This includes setting the transaction isolation level to Read Committed and adjusting the *innodb_spin_wait_delay* parameter to mitigate throughput degradation.
1616

17-
<img src="media\image-20240829080057376.png" alt="image-20240829080057376" style="zoom:150%;" />
17+
<img src="media/image-20240829080057376.png" alt="image-20240829080057376" style="zoom:150%;" />
1818

1919
Figure 1-1. Scalability problems in MySQL 5.7.39 during BenchmarkSQL testing.
2020

2121
From the figure, it is evident that scalability problems significantly limit the increase in MySQL throughput. For example, after 100 concurrency, the throughput begins to decline. Due to MySQL's historical scalability challenges, Percona even open-sourced a thread pool to address these problems. The following figure illustrates the relationship between TPC-C throughput and concurrency after configuring the Percona thread pool.
2222

23-
<img src="media\image-20240829080659528.png" alt="image-20240829080659528" style="zoom:150%;" />
23+
<img src="media/image-20240829080659528.png" alt="image-20240829080659528" style="zoom:150%;" />
2424

2525
Figure 1-2. Percona thread pool mitigates scalability problems in MySQL 5.7.39.
2626

@@ -62,7 +62,7 @@ Meta's case study demonstrates that the new solution based on the Raft protocol
6262

6363
With the transaction isolation level set to Read Committed, simulations based on Group Replication were conducted under various network latency conditions.
6464

65-
The deployment setup of Group Replication is illustrated as follows: On machine A, two MySQL instances are deployed¡ªone serving as the primary and the other as the secondary. These two instances form the majority and communicate via localhost. Machine B hosts a third instance deployed as a member of the cluster, with a network latency of X milliseconds.
65+
The deployment setup of Group Replication is illustrated as follows: On machine A, two MySQL instances are deployed—one serving as the primary and the other as the secondary. These two instances form the majority and communicate via localhost. Machine B hosts a third instance deployed as a member of the cluster, with a network latency of X milliseconds.
6666

6767
![](media/792556dcff5f267dcc5aefeb5ef0d035.png)
6868

@@ -72,15 +72,15 @@ In theory, with a majority-based mechanism, a cluster of 3 nodes only needs resp
7272

7373
Throughput comparisons over time have been conducted for machine B in scenarios within the same data center and across data centers with latencies of 10ms, 100ms, and 1000ms. Specific results are illustrated in the following figure.
7474

75-
<img src="media\image-20240829081015123.png" alt="image-20240829081015123" style="zoom:150%;" />
75+
<img src="media/image-20240829081015123.png" alt="image-20240829081015123" style="zoom:150%;" />
7676

7777
Figure 1-7. Performance testing results of the default multi-leader Paxos algorithm.
7878

7979
From the figure, it is evident that under the default mode of Group Replication, throughput across data centers deviates significantly from theoretical expectations. For example, in scenarios with 10ms network latency, the cluster's throughput decreases to one-fifth of its original level. To address this discrepancy, starting with MySQL 8.0.27, the *group_replication_paxos_single_leader* option was introduced. Enabling this option utilizes the single leader Paxos algorithm instead of the default multi-leader Paxos algorithm.
8080

8181
After configuring Group Replication to use the single leader Paxos algorithm, tests were conducted under the same conditions using the SysBench testing tool. The test results are as follows.
8282

83-
<img src="media\image-20240829081049988.png" alt="image-20240829081049988" style="zoom:150%;" />
83+
<img src="media/image-20240829081049988.png" alt="image-20240829081049988" style="zoom:150%;" />
8484

8585
Figure 1-8. Performance testing results of the single-leader Paxos algorithm.
8686

0 commit comments

Comments
 (0)