AstroPaper
Nothing but more and more nothingness.
Heading 1
Text
Heading 2
Text
Heading 3
Text
Heading 4
Text
Heading 5
Text
Heading 6
Text
Text Formatting
Regular
bold
italic
strike
==highlight==
inline-code
Cites
This is a cite
Inline math
Inline math works fine.
Math Block
Tables
First Column | Second Column | Third Column |
---|---|---|
One | Two | Three |
Four | Five | Six |
Code
Code Overflow
ANSI escape sequences
Marking full lines & line ranges
Using diff-like syntax
Lists
- 注意这里的 sequential flag
- 这里的
f*
代表以 f 开头的所有文件 - 通过只 watch
NEXT LOWER #FILE
减少 rpc 的数量 - 由于在分布式系统中可能会出现 Partial Failure,所以这里的锁并不能保证原子性
- 在一个分布式系统中,Zookeeper 实现的锁有如下的使用场景
- 每一个获得锁的 client,需要做好准备清理之前锁持有者因为故障残留的数据
- Soft Lock 用来保护一些不太重要的数据,例如运行 MapReduce Job 时,可以用这样的锁来确保一个 Task 同时只被一个 Worker 节点执行,也可以用来选举 Master
- 在一个分布式系统中,Zookeeper 实现的锁有如下的使用场景
- server 的数量是奇数
- 必须凑够过半的服务器来批准完成任何的操作
- 如果网络存在分区,那么必然不可能有超过一个分区拥有过半数量的服务器
- 这里的过半是所有服务器数量的一半,而不是当前可用的服务器数量的一半
Links
Images
Mermaid
flowchart LR
A["x = 0, y = 0"] --> B["x = 1"]
A --> C["y = 1"]
B --> D["r1 = y(0) - speculation"]
C --> E["r2 = x(0) - speculation"]
A -.-> D
A -.-> E
Word Break
PneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosis
PneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosis
- PneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosis
- PneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosis
PneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosis
PneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosis
PneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosis
PneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosis
PneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosis
PneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosisPneumonoultramicroscopicsilicovolcanoconiosis