mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
doc fix grammar issue
This commit is contained in:
parent
0762c79e2e
commit
59e98fcc62
@ -179,7 +179,7 @@ func (n *node) Remove(dir, recursive bool, callback func(path string)) *etcdErr.
|
||||
|
||||
if n.IsDir() {
|
||||
if !dir {
|
||||
// cannot delete a directory without set recursive to true
|
||||
// cannot delete a directory without recursive set to true
|
||||
return etcdErr.NewError(etcdErr.EcodeNotFile, n.Path, n.store.Index())
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ func TestStoreDeleteDiretory(t *testing.T) {
|
||||
// create directory /foo
|
||||
s.Create("/foo", true, "", false, Permanent)
|
||||
// delete /foo with dir = true and recursive = false
|
||||
// this should success, since the directory is empty
|
||||
// this should succeed, since the directory is empty
|
||||
e, err := s.Delete("/foo", true, false)
|
||||
assert.Nil(t, err, "")
|
||||
assert.Equal(t, e.Action, "delete", "")
|
||||
@ -299,7 +299,7 @@ func TestStoreDeleteDiretory(t *testing.T) {
|
||||
assert.NotNil(t, err, "")
|
||||
|
||||
// delete /foo with dir=false and recursive = true
|
||||
// this should success, since recursive implies dir=true
|
||||
// this should succeed, since recursive implies dir=true
|
||||
// and recursively delete should be able to delete all
|
||||
// items under the given directory
|
||||
e, err = s.Delete("/foo", false, true)
|
||||
|
4
third_party/github.com/coreos/raft/log.go
vendored
4
third_party/github.com/coreos/raft/log.go
vendored
@ -366,7 +366,8 @@ func (l *Log) setCommitIndex(index uint64) error {
|
||||
// this is not error any more after limited the number of sending entries
|
||||
// commit up to what we already have
|
||||
if index > l.startIndex+uint64(len(l.entries)) {
|
||||
debugln("raft.Log: Commit index", index, "set back to ", len(l.entries))
|
||||
debugln("raft.StartIndex", l.startIndex)
|
||||
debugln("raft.Log: Commit index", index, "set back to ", l.startIndex+uint64(len(l.entries)))
|
||||
index = l.startIndex + uint64(len(l.entries))
|
||||
}
|
||||
|
||||
@ -386,6 +387,7 @@ func (l *Log) setCommitIndex(index uint64) error {
|
||||
// follower 2 should reply success and let leader 3 update the committed index to 80
|
||||
|
||||
if index < l.commitIndex {
|
||||
debugln("raft.Log: index", index, "committedIndex", l.commitIndex)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user