mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #1858 from vlajos/typofixes-vlajos-20141204
typofixes - https://github.com/vlajos/misspell_fixer
This commit is contained in:
commit
197e6b1b20
@ -6,7 +6,7 @@ v0.4.6
|
||||
* Various documentation improvements (#907, #882)
|
||||
|
||||
v0.4.5
|
||||
* Flush headers immediatly on `wait=true` requests (#877)
|
||||
* Flush headers immediately on `wait=true` requests (#877)
|
||||
* Add `ETCD_HTTP_READ_TIMEOUT` and `ETCD_HTTP_WRITE_TIMEOUT` (#880)
|
||||
* Add `ETCDCTL_PEERS` configuration to etcdctl (#95)
|
||||
* etcdctl takes stdin for mk (#91)
|
||||
|
@ -305,7 +305,7 @@ func TestUnmarshalSuccessfulResponse(t *testing.T) {
|
||||
t.Errorf("#%d: received res==%v, but expected res==%v", i, res, tt.res)
|
||||
continue
|
||||
} else if tt.res == nil {
|
||||
// expected and succesfully got nil response
|
||||
// expected and successfully got nil response
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ func restartAsStandaloneNode(cfg *ServerConfig, index uint64, snapshot *raftpb.S
|
||||
// discard the previously uncommitted entries
|
||||
for i, ent := range ents {
|
||||
if ent.Index > st.Commit {
|
||||
log.Printf("etcdserver: discarding %d uncommited WAL entries ", len(ents)-i)
|
||||
log.Printf("etcdserver: discarding %d uncommitted WAL entries ", len(ents)-i)
|
||||
ents = ents[:i]
|
||||
break
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ type Storage interface {
|
||||
// SaveSnap function saves snapshot to the underlying stable storage.
|
||||
SaveSnap(snap raftpb.Snapshot) error
|
||||
|
||||
// TODO: WAL should be able to control cut itself. After implement self-controled cut,
|
||||
// TODO: WAL should be able to control cut itself. After implement self-controlled cut,
|
||||
// remove it in this interface.
|
||||
// Cut cuts out a new wal file for saving new state and entries.
|
||||
Cut() error
|
||||
|
@ -23,7 +23,7 @@ import (
|
||||
// WARNING: This is a hack.
|
||||
// Remove this when we are able to block/check the status of the go-routines.
|
||||
func ForceGosched() {
|
||||
// possibility enough to sched upto 10 go routines.
|
||||
// possibility enough to sched up to 10 go routines.
|
||||
for i := 0; i < 10000; i++ {
|
||||
runtime.Gosched()
|
||||
}
|
||||
|
@ -552,7 +552,7 @@ func TestLogRestore(t *testing.T) {
|
||||
t.Errorf("firstIndex = %d, want %d", raftLog.firstIndex(), index+1)
|
||||
}
|
||||
if raftLog.committed != index {
|
||||
t.Errorf("comitted = %d, want %d", raftLog.committed, index)
|
||||
t.Errorf("committed = %d, want %d", raftLog.committed, index)
|
||||
}
|
||||
if raftLog.unstable.offset != index+1 {
|
||||
t.Errorf("unstable = %d, want %d", raftLog.unstable, index+1)
|
||||
|
@ -358,7 +358,7 @@ func TestNodeRestart(t *testing.T) {
|
||||
|
||||
want := Ready{
|
||||
HardState: emptyState,
|
||||
// commit upto index commit index in st
|
||||
// commit up to index commit index in st
|
||||
CommittedEntries: entries[:st.Commit],
|
||||
}
|
||||
|
||||
@ -393,7 +393,7 @@ func TestNodeRestartFromSnapshot(t *testing.T) {
|
||||
|
||||
want := Ready{
|
||||
HardState: emptyState,
|
||||
// commit upto index commit index in st
|
||||
// commit up to index commit index in st
|
||||
CommittedEntries: entries,
|
||||
}
|
||||
|
||||
|
@ -668,10 +668,10 @@ func TestHandleMsgApp(t *testing.T) {
|
||||
{pb.Message{Type: pb.MsgApp, Term: 2, LogTerm: 1, Index: 1, Commit: 4, Entries: []pb.Entry{{Index: 2, Term: 2}}}, 2, 2, false},
|
||||
|
||||
// Ensure 3
|
||||
{pb.Message{Type: pb.MsgApp, Term: 1, LogTerm: 1, Index: 1, Commit: 3}, 2, 1, false}, // match entry 1, commit upto last new entry 1
|
||||
{pb.Message{Type: pb.MsgApp, Term: 1, LogTerm: 1, Index: 1, Commit: 3, Entries: []pb.Entry{{Index: 2, Term: 2}}}, 2, 2, false}, // match entry 1, commit upto last new entry 2
|
||||
{pb.Message{Type: pb.MsgApp, Term: 2, LogTerm: 2, Index: 2, Commit: 3}, 2, 2, false}, // match entry 2, commit upto last new entry 2
|
||||
{pb.Message{Type: pb.MsgApp, Term: 2, LogTerm: 2, Index: 2, Commit: 4}, 2, 2, false}, // commit upto log.last()
|
||||
{pb.Message{Type: pb.MsgApp, Term: 1, LogTerm: 1, Index: 1, Commit: 3}, 2, 1, false}, // match entry 1, commit up to last new entry 1
|
||||
{pb.Message{Type: pb.MsgApp, Term: 1, LogTerm: 1, Index: 1, Commit: 3, Entries: []pb.Entry{{Index: 2, Term: 2}}}, 2, 2, false}, // match entry 1, commit up to last new entry 2
|
||||
{pb.Message{Type: pb.MsgApp, Term: 2, LogTerm: 2, Index: 2, Commit: 3}, 2, 2, false}, // match entry 2, commit up to last new entry 2
|
||||
{pb.Message{Type: pb.MsgApp, Term: 2, LogTerm: 2, Index: 2, Commit: 4}, 2, 2, false}, // commit up to log.last()
|
||||
}
|
||||
|
||||
for i, tt := range tests {
|
||||
@ -918,7 +918,7 @@ func TestLeaderAppResp(t *testing.T) {
|
||||
wcommitted uint64
|
||||
}{
|
||||
{3, true, 0, 3, 0, 0, 0}, // stale resp; no replies
|
||||
{2, true, 0, 2, 1, 1, 0}, // denied resp; leader does not commit; decrese next and send probing msg
|
||||
{2, true, 0, 2, 1, 1, 0}, // denied resp; leader does not commit; decrease next and send probing msg
|
||||
{2, false, 2, 4, 2, 2, 2}, // accept resp; leader commits; broadcast with commit index
|
||||
{0, false, 0, 3, 0, 0, 0}, // ignore heartbeat replies
|
||||
}
|
||||
@ -1223,7 +1223,7 @@ func TestSlowNodeRestore(t *testing.T) {
|
||||
// trigger a commit
|
||||
nt.send(pb.Message{From: 1, To: 1, Type: pb.MsgProp, Entries: []pb.Entry{{}}})
|
||||
if follower.raftLog.committed != lead.raftLog.committed {
|
||||
t.Errorf("follower.comitted = %d, want %d", follower.raftLog.committed, lead.raftLog.committed)
|
||||
t.Errorf("follower.committed = %d, want %d", follower.raftLog.committed, lead.raftLog.committed)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ const (
|
||||
|
||||
type Sender interface {
|
||||
// StartStreaming enables streaming in the sender using the given writer,
|
||||
// which provides a fast and effecient way to send appendEntry messages.
|
||||
// which provides a fast and efficient way to send appendEntry messages.
|
||||
StartStreaming(w WriteFlusher, to types.ID, term uint64) (done <-chan struct{}, err error)
|
||||
Update(u string)
|
||||
// Send sends the data to the remote node. It is always non-blocking.
|
||||
|
@ -124,7 +124,7 @@ func loadSnap(dir, name string) (*raftpb.Snapshot, error) {
|
||||
}
|
||||
|
||||
// snapNames returns the filename of the snapshots in logical time order (from newest to oldest).
|
||||
// If there is no avaliable snapshots, an ErrNoSnapshot will be returned.
|
||||
// If there is no available snapshots, an ErrNoSnapshot will be returned.
|
||||
func (s *Snapshotter) snapNames() ([]string, error) {
|
||||
dir, err := os.Open(s.dir)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user