Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit cddafc4

Browse files
committed
wording
1 parent 8064f48 commit cddafc4

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

api/graphite.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -1017,9 +1017,8 @@ func (s *Server) graphiteTagFindSeries(ctx *middleware.Context, request models.G
10171017
return
10181018
}
10191019

1020-
// If limit is specified and less than the global `maxSeriesPerReq` (or `maxSeriesPerReq` is disabled),
1021-
// then this is a "soft" limit, meaning we stop and don't return an error. If global `maxSeriesPerReq`
1022-
// exists, then respect that
1020+
// Out of the provided soft limit and the global `maxSeriesPerReq` hard limit
1021+
// (either of which may be 0 aka disabled), pick the only one that matters: the most strict one.
10231022
isSoftLimit := true
10241023
limit := request.Limit
10251024
if maxSeriesPerReq > 0 && (limit == 0 || limit > maxSeriesPerReq) {
@@ -1078,6 +1077,8 @@ func (s *Server) graphiteTagFindSeries(ctx *middleware.Context, request models.G
10781077
}
10791078
}
10801079

1080+
// clusterFindByTag returns the Series matching the given expressions.
1081+
// If maxSeries is > 0, it specifies a limit which will truncate the resultset (if softLimit is true) or return an error otherwise.
10811082
func (s *Server) clusterFindByTag(ctx context.Context, orgId uint32, expressions tagquery.Expressions, from int64, maxSeries int, softLimit bool) ([]Series, error) {
10821083
data := models.IndexFindByTag{OrgId: orgId, Expr: expressions.Strings(), From: from}
10831084
newCtx, cancel := context.WithCancel(ctx)

docs/cloud/http-api.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ that duplicate entries will be returned.
280280
* expr (required): a list of [tag expressions](#tag-expressions)
281281
* from: Graphite [from time specification](#fromto) (optional. defaults to now-24hours)
282282
* format: series-json, lastts-json. (defaults to series-json)
283-
* limit: max number to return, 0 to defer to the instance configured max (default: 0). Note: if limit is 0 or greater than the instance configured max and the result set is greater than the instance configured max, an error is returned. Otherwise, the result set is truncated at the limit
283+
* limit: max number to return. (default: 0)
284+
Note: the resultset is also subjected to the cluster configuration.
285+
if the result set is larger than the cluster configuration, an error is returned. If it breaches the provided limit, the result is truncated.
284286
* meta: If false and format is `series-json` then return series names as array (graphite compatibility). If true, include meta information like warnings. (defaults to false)
285287

286288
##### Example

docs/http-api.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ that duplicate entries will be returned.
8282
* expr (required): a list of [tag expressions](#tag-expressions)
8383
* from: Graphite [from time specification](#fromto) (optional. defaults to now-24hours)
8484
* format: series-json, lastts-json. (defaults to series-json)
85-
* limit: max number to return, 0 to defer to `http.max-series-per-req` (default: 0). Note: if limit is 0 or greater than `http.max-series-per-req` and the result set is greater than `http.max-series-per-req`, an error is returned. Otherwise, the result set is truncated at the limit
85+
* limit: max number to return. (default: 0)
86+
Note: the resultset is also subjected to the `http.max-series-per-req` config setting.
87+
if the result set is larger than `http.max-series-per-req`, an error is returned. If it breaches the provided limit, the result is truncated.
8688
* meta: If false and format is `series-json` then return series names as array (graphite compatibility). If true, include meta information like warnings. (defaults to false)
8789

8890
##### Example

0 commit comments

Comments
 (0)