Skip to content

Commit

Permalink
Fix misspellings reported by misspell (hypermodeinc#2875)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmr authored Jan 9, 2019
1 parent 6627089 commit 301536e
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dgraph/cmd/live/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lex/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions posting/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion types/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions worker/draft.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions worker/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
})
Expand Down
2 changes: 1 addition & 1 deletion worker/stringfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion x/x.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 301536e

Please sign in to comment.