Skip to content

Commit

Permalink
Add a comment to the adaptive range limit comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgode committed Mar 28, 2018
1 parent b693cb0 commit 9cbd33d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pager.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type pager struct {
}

func addLimitTokenString(w io.Writer, limit int, token string) {
if limit == -1 || limit > 0 {
if limit == AdaptiveRangeLimit || limit > 0 {
fmt.Fprintf(w, " limit %d", limit)
}
if token != "" {
Expand Down
4 changes: 4 additions & 0 deletions range.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ import (
)

const (
// AdaptiveRangeLimit is a sentinel value that is used to indicate an intent
// to range over data in a partition as fast as possible. The server will
// determine an appropriate limit to use to range over the partition as fast
// as possible while ensuring the server remains healthy.
AdaptiveRangeLimit = -1
)

Expand Down

0 comments on commit 9cbd33d

Please sign in to comment.