# lab for MIT 6.5840
my implement for Lab of [MIT 6.5840](https://pdos.csail.mit.edu/6.824/)
## Lab status
- [X] Lab1(All test passed)
- [ ] Lab2
- [X] Lab2A
- [X] Lab2B
- [X] Lab2C
- [ ] Lab2D(working on)
- [ ] Lab3
- [ ] Lab4
## Citation
- [6.5840 course page](https://pdos.csail.mit.edu/6.824/index.html)
- 6.5840 labCode: git://g.csail.mit.edu/6.5840-golabs-2023 6.5840
- [MapReduce: Simplified Data Processing on Large Clusters](https://research.google/pubs/mapreduce-simplified-data-processing-on-large-clusters/)
- [raft page](https://raft.github.io/)
- [In Search of an Understandable Consensus Algorithm (Extended Version)](https://raft.github.io/raft.pdf)
- [Consensus: Bridging Theory and Practice](https://web.stanford.edu/~ouster/cgi-bin/papers/OngaroPhD.pdf)
- [Hashicorp Raft](https://github.com/hashicorp/raft)
- [ectd raft](https://etcd.io/)
- [cmap](https://github.com/lrita/cmap)
## Test result
> **Notice**:
test may failed(multiLeader/can't reach agreement) due to
Failure to set ElectionTimeout and HeartBeatTimeout carefully
### 2A
```bash
Test (2A): initial election ...
... Passed -- 3.1 3 86 23444 0
Test (2A): election after network failure ...
... Passed -- 4.9 3 104 21636 0
Test (2A): multiple elections ...
... Passed -- 5.5 7 449 97133 0
PASS
ok 6.5840/raft 13.419s
go test -run 2A 0.37s user 0.27s system 4% cpu 13.716 total
```
### 2B
```bash
Test (2B): basic agreement ...
... Passed -- 0.4 3 19 5674 3
Test (2B): RPC byte count ...
... Passed -- 0.9 3 68 131264 11
Test (2B): test progressive failure of followers ...
... Passed -- 4.4 3 122 27212 3
Test (2B): test failure of leaders ...
... Passed -- 4.5 3 138 32989 3
Test (2B): agreement after follower reconnects ...
... Passed -- 5.0 3 170 48394 8
Test (2B): no agreement if too many followers disconnect ...
... Passed -- 3.3 5 240 51695 4
Test (2B): concurrent Start()s ...
... Passed -- 0.6 3 20 6184 6
Test (2B): rejoin of partitioned leader ...
... Passed -- 3.6 3 123 32874 4
Test (2B): leader backs up quickly over incorrect follower logs ...
... Passed -- 10.4 5 2184 2306499 102
Test (2B): RPC counts arent too high ...
... Passed -- 2.1 3 72 22490 12
PASS
ok 6.5840/raft 35.238s
go test -run 2B -race 2.04s user 1.50s system 9% cpu 37.554 total
```
### 2C
```bash
Test (2C): basic persistence ...
... Passed -- 2.9 3 94 26695 6
Test (2C): more persistence ...
... Passed -- 14.0 5 985 234116 16
Test (2C): partitioned leader and one follower crash, leader restarts ...
... Passed -- 1.2 3 43 11716 4
Test (2C): Figure 8 ...
... Passed -- 29.5 5 1415 342308 69
Test (2C): unreliable agreement ...
... Passed -- 3.5 5 956 722911 246
Test (2C): Figure 8 (unreliable) ...
... Passed -- 39.7 5 17535 63457933 83
Test (2C): churn ...
... Passed -- 16.1 5 6052 17276044 527
Test (2C): unreliable churn ...
... Passed -- 16.3 5 7539 26118515 509
PASS
ok 6.5840/raft 123.459s
go test -run 2C -race 48.03s user 3.50s system 41% cpu 2:03.81 total
```
没有合适的资源?快使用搜索试试~ 我知道了~
DistributedSystemLab Raft一致性算法的Go实现.zip
共73个文件
go:54个
txt:8个
md:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 125 浏览量
2024-03-01
16:18:38
上传
评论
收藏 1.29MB ZIP 举报
温馨提示
DistributedSystemLab Raft一致性算法的Go实现.zip
资源推荐
资源详情
资源评论
收起资源包目录
DistributedSystemLab Raft一致性算法的Go实现.zip (73个子文件)
DistributedSystemLab-master
Makefile 1KB
src
shardkv
test_test.go 18KB
common.go 854B
config.go 9KB
server.go 3KB
client.go 3KB
go.mod 23B
go.sum 0B
mrapps
nocrash.go 952B
jobcount.go 1007B
mtiming.go 2KB
crash.go 1KB
rtiming.go 2KB
wc.go 1KB
early_exit.go 946B
indexer.go 1KB
porcupine
porcupine.go 1KB
model.go 2KB
bitset.go 1KB
visualization.go 30KB
checker.go 9KB
mr
coordinator.go 7KB
worker.go 7KB
rpc.go 1KB
labgob
test_test.go 3KB
labgob.go 4KB
shardctrler
test_test.go 9KB
common.go 1KB
config.go 8KB
server.go 2KB
client.go 2KB
labrpc
test_test.go 11KB
labrpc.go 13KB
raft
test_test.go 27KB
logentry.go 3KB
util.go 4KB
raft.go 35KB
future.go 2KB
config.go 16KB
replication.go 39B
persister.go 1KB
commands.go 2KB
kvraft
test_test.go 20KB
common.go 531B
config.go 10KB
server.go 3KB
client.go 2KB
models
kv.go 2KB
.gitignore 167B
main
pg-huckleberry_finn.txt 580KB
pg-tom_sawyer.txt 403KB
pg-sherlock_holmes.txt 568KB
test-mr-many.sh 469B
test-mr.sh 8KB
mrworker.go 1KB
pg-being_ernest.txt 136KB
lockd.go 665B
viewd.go 290B
diskvd.go 2KB
pg-frankenstein.txt 431KB
mrsequential.go 2KB
pbc.go 883B
pbd.go 307B
pg-grimm.txt 528KB
pg-metamorphosis.txt 136KB
pg-dorian_gray.txt 443KB
lockc.go 507B
mrcoordinator.go 481B
readme.md 3KB
notes
lab2
readme.md 2KB
.gitignore 46B
.check-build 3KB
todo.md 460B
共 73 条
- 1
资源评论
处处清欢
- 粉丝: 154
- 资源: 2500
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功