Git Product home page Git Product logo

mit6.824_2021_spring's Introduction

mit6.824_2021_spring's People

Contributors

alohaposter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mit6.824_2021_spring's Issues

你好,我想问下一些常量的参数是怎么取的

eg:
ELECTION_TIMEOUT_MAX = 100
ELECTION_TIMEOUT_MIN = 50
HEARTBEAT_TIMEOUT = 27
APPLIED_TIMEOUT = 28

rf.candidateElectionTicker() 中是睡眠50~100ms 然后去判断 ElectionTimeout 是否超时
rf.leaderAppendEntriesTicker() 中是睡眠27ms 再去判断是否心跳超时,这些数字是怎么取的呢?

notes 里面说,发送心跳的频率最少100ms 一次,选举超时150~300ms,建议更长。
这样设置是否有违背 notes。

lab2D 中关于 raft_snapshot.go 的疑问

~/src/raft/raft_snapshot.go 中的 Snapshot 方法,在方法入口处对 index 进行了校验:如果 index > commitIndex 就直接返回。
所以49行的判断是否多余了呢?我理解经过校验后 index 是小于等于 commitIndex 的,那么也必然是小于 rf.getLastIndex()+1 的。
58行也是同理,此时 index <= commitIndex,我认为 if 的条件是走不进的。

烦请解答,提前感谢了。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.