From 301536ed54c53c2b76ac925023d223f61a36298b Mon Sep 17 00:00:00 2001 From: Martin Martinez Rivera Date: Tue, 8 Jan 2019 17:48:29 -0800 Subject: [PATCH] Fix misspellings reported by misspell (#2875) --- dgraph/cmd/live/batch.go | 2 +- lex/lexer.go | 4 ++-- posting/list.go | 4 ++-- types/value.go | 2 +- worker/draft.go | 6 +++--- worker/groups.go | 4 ++-- worker/stringfilter.go | 2 +- x/x.go | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dgraph/cmd/live/batch.go b/dgraph/cmd/live/batch.go index 543fc7771ad..977192b3120 100644 --- a/dgraph/cmd/live/batch.go +++ b/dgraph/cmd/live/batch.go @@ -128,7 +128,7 @@ type Counter struct { } // handleError inspects errors and terminates if the errors are non-recoverable. -// A gRPC code is Internal if there is an unforseen issue that needs attention. +// A gRPC code is Internal if there is an unforeseen issue that needs attention. // A gRPC code is Unavailable when we can't possibly reach the remote server, most likely the // server expects TLS and our certificate does not match or the host name is not verified. When // the node certificate is created the name much match the request host name. e.g., localhost not diff --git a/lex/lexer.go b/lex/lexer.go index 76064bf9da2..2526acd5985 100644 --- a/lex/lexer.go +++ b/lex/lexer.go @@ -196,7 +196,7 @@ type CheckRune func(r rune) bool type CheckRuneRec func(r rune, l *Lexer) bool // AcceptRun accepts tokens based on CheckRune -// untill it returns false or EOF is reached. +// until it returns false or EOF is reached. // Returns last rune accepted and valid flag for rune. func (l *Lexer) AcceptRun(c CheckRune) (lastr rune, validr bool) { validr = false @@ -213,7 +213,7 @@ func (l *Lexer) AcceptRun(c CheckRune) (lastr rune, validr bool) { } // AcceptRunRec accepts tokens based on CheckRuneRec -// untill it returns false or EOF is reached. +// until it returns false or EOF is reached. func (l *Lexer) AcceptRunRec(c CheckRuneRec) { for { r := l.Next() diff --git a/posting/list.go b/posting/list.go index 79d6a7d4156..35d74c5db54 100644 --- a/posting/list.go +++ b/posting/list.go @@ -207,7 +207,7 @@ func hasDeleteAll(mpost *pb.Posting) bool { return mpost.Op == Del && bytes.Equal(mpost.Value, []byte(x.Star)) } -// Ensure that you either abort the uncomitted postings or commit them before calling me. +// Ensure that you either abort the uncommitted postings or commit them before calling me. func (l *List) updateMutationLayer(mpost *pb.Posting) { l.AssertLock() x.AssertTrue(mpost.Op == Set || mpost.Op == Del) @@ -674,7 +674,7 @@ func (l *List) rollup(readTs uint64) error { } } - // Keep all uncommited Entries or postings with commitTs > l.commitTs + // Keep all uncommitted Entries or postings with commitTs > l.commitTs // in mutation map. Discard all else. // TODO: This could be removed after LRU cache is removed. for startTs, plist := range l.mutationMap { diff --git a/types/value.go b/types/value.go index 3ddc22b9e0d..f39f442a83d 100644 --- a/types/value.go +++ b/types/value.go @@ -24,7 +24,7 @@ import ( // TypeForValue tries to determine the most likely type based on a value. We only want to use this // function when there's no schema type and no suggested storage type. // Returns the guessed type or DefaultID if it couldn't be determined. -// If retval is non-nil, the parsed value is returned, useful in conjuction with ObjectValue(). +// If retval is non-nil, the parsed value is returned, useful in conjunction with ObjectValue(). func TypeForValue(v []byte) (TypeID, interface{}) { s := string(v) switch { diff --git a/worker/draft.go b/worker/draft.go index 68602a828a0..9e9d91ea42e 100644 --- a/worker/draft.go +++ b/worker/draft.go @@ -176,9 +176,9 @@ func (n *node) applyMutations(ctx context.Context, proposal *pb.Proposal) error span.Annotatef(nil, "Applying schema") for _, supdate := range proposal.Mutations.Schema { // This is neceassry to ensure that there is no race between when we start reading - // from badger and new mutation getting commited via raft and getting applied. + // from badger and new mutation getting committed via raft and getting applied. // Before Moving the predicate we would flush all and wait for watermark to catch up - // but there might be some proposals which got proposed but not comitted yet. + // but there might be some proposals which got proposed but not committed yet. // It's ok to reject the proposal here and same would happen on all nodes because we // would have proposed membershipstate, and all nodes would have the proposed state // or some state after that before reaching here. @@ -276,7 +276,7 @@ func (n *node) applyCommitted(proposal *pb.Proposal) error { n.Id, n.gid, proposal.Key) if proposal.Mutations != nil { - // syncmarks for this shouldn't be marked done until it's comitted. + // syncmarks for this shouldn't be marked done until it's committed. span.Annotate(nil, "Applying mutations") if err := n.applyMutations(ctx, proposal); err != nil { span.Annotatef(nil, "While applying mutations: %v", err) diff --git a/worker/groups.go b/worker/groups.go index a05fb5a3a94..1dfcf913232 100644 --- a/worker/groups.go +++ b/worker/groups.go @@ -804,7 +804,7 @@ func (g *groupi) cleanupTablets() { for itr.Rewind(); itr.Valid(); { item := itr.Item() - // TODO: Investiage out of bounds. + // TODO: Investigate out of bounds. pk := x.Parse(item.Key()) if pk == nil { itr.Next() @@ -948,7 +948,7 @@ func (g *groupi) processOracleDeltaStream() { } // We should always sort the txns before applying. Otherwise, we might lose some of - // these updates, becuase we never write over a new version. + // these updates, because we never write over a new version. sort.Slice(delta.Txns, func(i, j int) bool { return delta.Txns[i].CommitTs < delta.Txns[j].CommitTs }) diff --git a/worker/stringfilter.go b/worker/stringfilter.go index 12cc31c7bd3..0ee37d9987a 100644 --- a/worker/stringfilter.go +++ b/worker/stringfilter.go @@ -101,7 +101,7 @@ func tokenizeValue(value types.Val, filter stringFilter) []string { } tokenizer, found := tok.GetTokenizer(tokName) - // tokenizer was used in previous stages of query proccessing, it has to be available + // tokenizer was used in previous stages of query processing, it has to be available x.AssertTrue(found) tokens, err := tok.BuildTokens(value.Value, tok.GetLangTokenizer(tokenizer, filter.lang)) diff --git a/x/x.go b/x/x.go index 8b62bf2ab2e..2f3e14edadc 100644 --- a/x/x.go +++ b/x/x.go @@ -343,7 +343,7 @@ func (b *BytesBuffer) grow(n int) { b.off = 0 } -// returns a slice of lenght n to be used to writing +// returns a slice of length n to be used to writing func (b *BytesBuffer) Slice(n int) []byte { b.grow(n) last := len(b.data) - 1