auto commit
This commit is contained in:
parent
6cc517b214
commit
fdd608ce8b
|
@ -189,7 +189,7 @@ value 数组被声明为 final,这意味着 value 数组初始化之后就不
|
|||
|
||||
如果一个 String 对象已经被创建过了,那么就会从 String Pool 中取得引用。只有 String 是不可变的,才可能使用 String Pool。
|
||||
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/8ea6d399-ebcb-4077-b9c7-b2d825fe256c_200.png" width="300px"> </div><br>
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/9112288f-23f5-4e53-b222-a46fdbca1603.png" width="300px"> </div><br>
|
||||
|
||||
**3. 安全性**
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ EXPIRE 指令可以为一个键值对设置一个过期时间,从而避免了
|
|||
|
||||
Zookeeper 提供了一种树形结构级的命名空间,/app1/p_1 节点的父节点为 /app1。
|
||||
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/6bcfad76-931a-4d85-9b58-78bb87d9a449_200.png" width="300px"> </div><br>
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/aefa8042-15fa-4e8b-9f50-20b282a2c624.png" width="320px"> </div><br>
|
||||
|
||||
### 2. 节点类型
|
||||
|
||||
|
@ -111,7 +111,7 @@ Zookeeper 提供了一种树形结构级的命名空间,/app1/p_1 节点的父
|
|||
2. 之后将本地消息表中的消息转发到 Kafka 等消息队列中,如果转发成功则将消息从本地消息表中删除,否则继续重新转发。
|
||||
3. 在分布式事务操作的另一方从消息队列中读取一个消息,并执行消息中的操作。
|
||||
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/be772b17-2bfe-4393-9805-946b15666ecd_200.png" width="700px"> </div><br>
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/476329d4-e2ef-4f7b-8ac9-a52a6f784600.png" width="740px"> </div><br>
|
||||
|
||||
## 2PC
|
||||
|
||||
|
@ -123,7 +123,7 @@ Zookeeper 提供了一种树形结构级的命名空间,/app1/p_1 节点的父
|
|||
|
||||
协调者询问参与者事务是否执行成功,参与者发回事务执行结果。
|
||||
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/7da6d7e0-f08b-4ebd-b385-add5d6f03b84_200.png" width="500px"> </div><br>
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/44d33643-1004-43a3-b99a-4d688a08d0a1.png" width="550px"> </div><br>
|
||||
|
||||
#### 1.2 提交阶段
|
||||
|
||||
|
@ -131,7 +131,7 @@ Zookeeper 提供了一种树形结构级的命名空间,/app1/p_1 节点的父
|
|||
|
||||
需要注意的是,在准备阶段,参与者执行了事务,但是还未提交。只有在提交阶段接收到协调者发来的通知后,才进行提交或者回滚。
|
||||
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/f5dbd360-a66c-4a40-8c56-6ffbcb0a8cc9_200.png" width="500px"> </div><br>
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/d2ae9932-e2b1-4191-8ee9-e573f36d3895.png" width="550px"> </div><br>
|
||||
|
||||
### 2. 存在的问题
|
||||
|
||||
|
@ -155,7 +155,7 @@ Zookeeper 提供了一种树形结构级的命名空间,/app1/p_1 节点的父
|
|||
|
||||
分布式系统不可能同时满足一致性(C:Consistency)、可用性(A:Availability)和分区容忍性(P:Partition Tolerance),最多只能同时满足其中两项。
|
||||
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/49919961-856f-4a1d-940b-0019153ae06e_200.png" width="400px"> </div><br>
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/a14268b3-b937-4ffa-a34a-4cc53071686b.jpg" width="450px"> </div><br>
|
||||
|
||||
## 一致性
|
||||
|
||||
|
|
BIN
docs/pics/44d33643-1004-43a3-b99a-4d688a08d0a1.png
Normal file
BIN
docs/pics/44d33643-1004-43a3-b99a-4d688a08d0a1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
BIN
docs/pics/476329d4-e2ef-4f7b-8ac9-a52a6f784600.png
Normal file
BIN
docs/pics/476329d4-e2ef-4f7b-8ac9-a52a6f784600.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
BIN
docs/pics/9112288f-23f5-4e53-b222-a46fdbca1603.png
Normal file
BIN
docs/pics/9112288f-23f5-4e53-b222-a46fdbca1603.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
docs/pics/a14268b3-b937-4ffa-a34a-4cc53071686b.jpg
Normal file
BIN
docs/pics/a14268b3-b937-4ffa-a34a-4cc53071686b.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
BIN
docs/pics/aefa8042-15fa-4e8b-9f50-20b282a2c624.png
Normal file
BIN
docs/pics/aefa8042-15fa-4e8b-9f50-20b282a2c624.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
docs/pics/d2ae9932-e2b1-4191-8ee9-e573f36d3895.png
Normal file
BIN
docs/pics/d2ae9932-e2b1-4191-8ee9-e573f36d3895.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
Loading…
Reference in New Issue
Block a user