auto commit
This commit is contained in:
parent
bf127b8e68
commit
79e881c445
|
@ -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/b3a421e3-41b4-4e99-b612-bc695a7f622f.jpg" width="400px"> </div><br>
|
||||
<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>
|
||||
|
||||
### 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/76c7597a-8316-460d-b8fb-9752c4c43947.jpg"/> </div><br>
|
||||
<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>
|
||||
|
||||
## 2PC
|
||||
|
||||
|
@ -123,7 +123,7 @@ Zookeeper 提供了一种树形结构级的命名空间,/app1/p_1 节点的父
|
|||
|
||||
协调者询问参与者事务是否执行成功,参与者发回事务执行结果。
|
||||
|
||||
<div align="center"> <img src="https://gitee.com/CyC2018/CS-Notes/raw/master/docs/pics/963fac12-4eac-4922-8a5f-f262c11f80fb.jpg" width="700px"> </div><br>
|
||||
<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>
|
||||
|
||||
#### 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/9ffb82ad-9b7f-44df-b93f-fc8b3f4093a6.jpg" width="700px"> </div><br>
|
||||
<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>
|
||||
|
||||
### 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/c6fdb958-578d-4685-a5fa-400857be91d5.jpg" width="500px"> </div><br>
|
||||
<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>
|
||||
|
||||
## 一致性
|
||||
|
||||
|
|
BIN
docs/pics/49919961-856f-4a1d-940b-0019153ae06e_200.png
Normal file
BIN
docs/pics/49919961-856f-4a1d-940b-0019153ae06e_200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 79 KiB |
BIN
docs/pics/6bcfad76-931a-4d85-9b58-78bb87d9a449_200.png
Normal file
BIN
docs/pics/6bcfad76-931a-4d85-9b58-78bb87d9a449_200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
docs/pics/7da6d7e0-f08b-4ebd-b385-add5d6f03b84_200.png
Normal file
BIN
docs/pics/7da6d7e0-f08b-4ebd-b385-add5d6f03b84_200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
docs/pics/be772b17-2bfe-4393-9805-946b15666ecd_200.png
Normal file
BIN
docs/pics/be772b17-2bfe-4393-9805-946b15666ecd_200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 99 KiB |
BIN
docs/pics/f5dbd360-a66c-4a40-8c56-6ffbcb0a8cc9_200.png
Normal file
BIN
docs/pics/f5dbd360-a66c-4a40-8c56-6ffbcb0a8cc9_200.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
Loading…
Reference in New Issue
Block a user