Skip to content

Commit

Permalink
src: fix some misspell errors issue #63
Browse files Browse the repository at this point in the history
  • Loading branch information
hustjieke authored and BohuTANG committed Mar 22, 2019
1 parent 2db4902 commit 9a80276
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ type BackupConfig struct {
// mysql host
Host string

// mysql prot
// mysql port
Port int

// mysql basedir
Expand Down
2 changes: 1 addition & 1 deletion src/model/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type GTID struct {
// Mysql master log file which the slave is reading
Master_Log_File string

// Mysql master log postion which the slave has read
// Mysql master log position which the slave has read
Read_Master_Log_Pos uint64

// The name of the master binary log file containing the most recent event executed by the SQL thread
Expand Down
4 changes: 2 additions & 2 deletions src/raft/candidate.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (r *Candidate) Loop() {
r.resetElectionTimeout()
r.resetCheckVotesTimeout()

// boradcast voterequest
// broadcast voterequest
voteGranted := 1
idleVoted := 0
respChan := make(chan *model.RaftRPCResponse, r.getMembers())
Expand All @@ -86,7 +86,7 @@ func (r *Candidate) Loop() {
r.resetCheckVotesTimeout()
case <-r.electionTick.C:
voteGranted = 1
// boradcast voterequest
// broadcast voterequest
respChan = make(chan *model.RaftRPCResponse, r.getMembers())
r.sendRequestVoteHandler(respChan)

Expand Down
4 changes: 2 additions & 2 deletions src/raft/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func MockWaitMySQLPingTimeout() {
func MockWaitLeaderEggs(rafts []*Raft, leadernums int) int {
// wait
if leadernums == 0 {
// wait hearbeat boradcast
// wait hearbeat broadcast
time.Sleep(time.Millisecond * time.Duration(rafts[0].getElectionTimeout()*2))
return -1
}
Expand All @@ -147,7 +147,7 @@ func MockWaitLeaderEggs(rafts []*Raft, leadernums int) int {
if raft.getState() == LEADER {
nums++
if nums == leadernums {
// wait hearbeat boradcast
// wait hearbeat broadcast
time.Sleep(time.Millisecond * time.Duration(rafts[0].getElectionTimeout()))
done <- i
return
Expand Down
2 changes: 1 addition & 1 deletion src/raft/raft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func TestRaftLeaderDown(t *testing.T) {
// 5. Stop cluster1.leader
// 6. Stop cluster2.follower
// 6. wait cluster1.candidate eggs
// 8. cluster2.leader add cluster1.candidate as his peers and boradcast heartbeat to him
// 8. cluster2.leader add cluster1.candidate as his peers and broadcast heartbeat to him
// 9. cluster1.candidate give an ErrorInvalidRequest to cluster2.leader, since you are not a member of cluster1
// 10. cluster1.candidate add cluster2.leader as his peers
// 11. cluster2.leader get a requestvote from cluster1.candidate
Expand Down

0 comments on commit 9a80276

Please sign in to comment.