vmselect: in promql evaluation, return bytes requested when rollup memory limiter is unable to satisfy the request (#1838)

Co-authored-by: Michael Fuller <mfuller@digitalocean.com>
This commit is contained in:
Michael Fuller 2021-11-22 03:20:42 -07:00 committed by Aliaksandr Valialkin
parent 4c466b27f1
commit 8a94dd36d1
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -749,9 +749,10 @@ func evalRollupFuncWithMetricExpr(ec *EvalConfig, funcName string, rf rollupFunc
rss.Cancel()
return nil, fmt.Errorf("not enough memory for processing %d data points across %d time series with %d points in each time series; "+
"total available memory for concurrent requests: %d bytes; "+
"requested memory: %d bytes; "+
"possible solutions are: reducing the number of matching time series; switching to node with more RAM; "+
"increasing -memory.allowedPercent; increasing `step` query arg (%gs)",
rollupPoints, timeseriesLen*len(rcs), pointsPerTimeseries, rml.MaxSize, float64(ec.Step)/1e3)
rollupPoints, timeseriesLen*len(rcs), pointsPerTimeseries, rml.MaxSize, uint64(rollupMemorySize), float64(ec.Step)/1e3)
}
defer rml.Put(uint64(rollupMemorySize))