Commit 6f9ce15e authored by kevinmv2's avatar kevinmv2
Browse files

changing hella

parent eac8604e
......@@ -549,6 +549,9 @@ func (rf *Raft) Commit(command interface{}) {
LeaderCommit: rf.commitIndex}
}
rf.log = append(rf.log, newEntry)
rf.lastApplied = len(rf.log) - 1
messageIDX = rf.lastApplied
var commitlock sync.Mutex
commit_cond := sync.NewCond(&commitlock)
......@@ -601,7 +604,7 @@ func (rf *Raft) Commit(command interface{}) {
return
}
if count > majority {
rf.log = append(rf.log, newEntry)
rf.commitIndex = messageIDX
commitlock.Unlock()
return
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment