|
|
|
@ -281,10 +281,7 @@ Outer: |
|
|
|
|
// cause thousands of very large in flight buffers occupying large amounts
|
|
|
|
|
// of unused memory.
|
|
|
|
|
for len(samples) > 0 { |
|
|
|
|
m := 5000 |
|
|
|
|
if len(samples) < m { |
|
|
|
|
m = len(samples) |
|
|
|
|
} |
|
|
|
|
m := min(len(samples), 5000) |
|
|
|
|
for i := 0; i < concurrency; i++ { |
|
|
|
|
if shards[i] == nil { |
|
|
|
|
shards[i] = processors[i].reuseBuf() |
|
|
|
@ -346,10 +343,7 @@ Outer: |
|
|
|
|
// cause thousands of very large in flight buffers occupying large amounts
|
|
|
|
|
// of unused memory.
|
|
|
|
|
for len(samples) > 0 { |
|
|
|
|
m := 5000 |
|
|
|
|
if len(samples) < m { |
|
|
|
|
m = len(samples) |
|
|
|
|
} |
|
|
|
|
m := min(len(samples), 5000) |
|
|
|
|
for i := 0; i < concurrency; i++ { |
|
|
|
|
if histogramShards[i] == nil { |
|
|
|
|
histogramShards[i] = processors[i].reuseHistogramBuf() |
|
|
|
@ -382,10 +376,7 @@ Outer: |
|
|
|
|
// cause thousands of very large in flight buffers occupying large amounts
|
|
|
|
|
// of unused memory.
|
|
|
|
|
for len(samples) > 0 { |
|
|
|
|
m := 5000 |
|
|
|
|
if len(samples) < m { |
|
|
|
|
m = len(samples) |
|
|
|
|
} |
|
|
|
|
m := min(len(samples), 5000) |
|
|
|
|
for i := 0; i < concurrency; i++ { |
|
|
|
|
if histogramShards[i] == nil { |
|
|
|
|
histogramShards[i] = processors[i].reuseHistogramBuf() |
|
|
|
@ -813,10 +804,7 @@ func (h *Head) loadWBL(r *wlog.Reader, syms *labels.SymbolTable, multiRef map[ch |
|
|
|
|
// cause thousands of very large in flight buffers occupying large amounts
|
|
|
|
|
// of unused memory.
|
|
|
|
|
for len(samples) > 0 { |
|
|
|
|
m := 5000 |
|
|
|
|
if len(samples) < m { |
|
|
|
|
m = len(samples) |
|
|
|
|
} |
|
|
|
|
m := min(len(samples), 5000) |
|
|
|
|
for i := 0; i < concurrency; i++ { |
|
|
|
|
if shards[i] == nil { |
|
|
|
|
shards[i] = processors[i].reuseBuf() |
|
|
|
@ -869,10 +857,7 @@ func (h *Head) loadWBL(r *wlog.Reader, syms *labels.SymbolTable, multiRef map[ch |
|
|
|
|
// cause thousands of very large in flight buffers occupying large amounts
|
|
|
|
|
// of unused memory.
|
|
|
|
|
for len(samples) > 0 { |
|
|
|
|
m := 5000 |
|
|
|
|
if len(samples) < m { |
|
|
|
|
m = len(samples) |
|
|
|
|
} |
|
|
|
|
m := min(len(samples), 5000) |
|
|
|
|
for i := 0; i < concurrency; i++ { |
|
|
|
|
if histogramShards[i] == nil { |
|
|
|
|
histogramShards[i] = processors[i].reuseHistogramBuf() |
|
|
|
@ -901,10 +886,7 @@ func (h *Head) loadWBL(r *wlog.Reader, syms *labels.SymbolTable, multiRef map[ch |
|
|
|
|
// cause thousands of very large in flight buffers occupying large amounts
|
|
|
|
|
// of unused memory.
|
|
|
|
|
for len(samples) > 0 { |
|
|
|
|
m := 5000 |
|
|
|
|
if len(samples) < m { |
|
|
|
|
m = len(samples) |
|
|
|
|
} |
|
|
|
|
m := min(len(samples), 5000) |
|
|
|
|
for i := 0; i < concurrency; i++ { |
|
|
|
|
if histogramShards[i] == nil { |
|
|
|
|
histogramShards[i] = processors[i].reuseHistogramBuf() |
|
|
|
|