|
|
@@ -16,7 +16,7 @@ package raft
|
|
|
|
|
|
import pb "github.com/coreos/etcd/raft/raftpb"
|
|
|
|
|
|
-// unstable.entris[i] has raft log position i+unstable.offset.
|
|
|
+// unstable.entries[i] has raft log position i+unstable.offset.
|
|
|
// Note that unstable.offset may be less than the highest log
|
|
|
// position in storage; this means that the next write to storage
|
|
|
// might need to truncate the log before persisting unstable.entries.
|
|
|
@@ -80,7 +80,7 @@ func (u *unstable) stableTo(i, t uint64) {
|
|
|
return
|
|
|
}
|
|
|
// if i < offest, term is matched with the snapshot
|
|
|
- // only update the unstalbe entries if term is matched with
|
|
|
+ // only update the unstable entries if term is matched with
|
|
|
// an unstable entry.
|
|
|
if gt == t && i >= u.offset {
|
|
|
u.entries = u.entries[i+1-u.offset:]
|