mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-31 15:06:26 +00:00
wip
This commit is contained in:
parent
87de9936f9
commit
21f09ab823
2 changed files with 3 additions and 1 deletions
|
@ -19,6 +19,8 @@ according to [these docs](https://docs.victoriametrics.com/VictoriaLogs/QuickSta
|
|||
|
||||
## tip
|
||||
|
||||
* BUGFIX: properly take into account `offset` [`sort` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe) when it already has `limit`. For example, `_time:5m | sort by (foo) offset 20 limit 10`.
|
||||
|
||||
## [v0.7.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.7.0-victorialogs)
|
||||
|
||||
Released at 2024-05-15
|
||||
|
|
|
@ -263,7 +263,7 @@ func (shard *pipeTopkProcessorShard) addRow(byColumns []string, otherColumns []F
|
|||
// Slow path - add r to shard.rows.
|
||||
r = r.clone()
|
||||
shard.stateSizeBudget -= r.sizeBytes()
|
||||
if uint64(len(rows)) < shard.ps.limit {
|
||||
if uint64(len(rows)) < shard.ps.offset+shard.ps.limit {
|
||||
heap.Push(shard, r)
|
||||
shard.stateSizeBudget -= int(unsafe.Sizeof(r))
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue