mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-31 15:06:26 +00:00
wip
This commit is contained in:
parent
52f08d7a19
commit
69a6543609
3 changed files with 9 additions and 8 deletions
|
@ -22,6 +22,7 @@ according to [these docs](https://docs.victoriametrics.com/VictoriaLogs/QuickSta
|
||||||
* FEATURE: use [natural sort order](https://en.wikipedia.org/wiki/Natural_sort_order) when sorting logs via [`sort` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe).
|
* FEATURE: use [natural sort order](https://en.wikipedia.org/wiki/Natural_sort_order) when sorting logs via [`sort` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe).
|
||||||
|
|
||||||
* BUGFIX: properly return matching logs in [streams](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) with small number of entries. Previously they could be skipped. The issue has been introduced in [the release v0.6.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.6.0-victorialogs).
|
* BUGFIX: properly return matching logs in [streams](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) with small number of entries. Previously they could be skipped. The issue has been introduced in [the release v0.6.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.6.0-victorialogs).
|
||||||
|
* BUGFIX: fix `runtime error: index out of range` panic when using [`sort` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe) like `_time:1h | sort by (_time)`. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6258).
|
||||||
|
|
||||||
## [v0.6.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.6.0-victorialogs)
|
## [v0.6.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.6.0-victorialogs)
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@ func (br *blockResult) cloneValues(values []string) []string {
|
||||||
|
|
||||||
for _, v := range values {
|
for _, v := range values {
|
||||||
if len(valuesBuf) > 0 && v == valuesBuf[len(valuesBuf)-1] {
|
if len(valuesBuf) > 0 && v == valuesBuf[len(valuesBuf)-1] {
|
||||||
valuesBuf = append(valuesBuf, v)
|
valuesBuf = append(valuesBuf, valuesBuf[len(valuesBuf)-1])
|
||||||
} else {
|
} else {
|
||||||
bufLen := len(buf)
|
bufLen := len(buf)
|
||||||
buf = append(buf, v...)
|
buf = append(buf, v...)
|
||||||
|
@ -287,7 +287,7 @@ func (br *blockResult) addColumn(bs *blockSearch, ch *columnHeader, bm *bitmap)
|
||||||
|
|
||||||
appendValue := func(v string) {
|
appendValue := func(v string) {
|
||||||
if len(valuesBuf) > 0 && v == valuesBuf[len(valuesBuf)-1] {
|
if len(valuesBuf) > 0 && v == valuesBuf[len(valuesBuf)-1] {
|
||||||
valuesBuf = append(valuesBuf, v)
|
valuesBuf = append(valuesBuf, valuesBuf[len(valuesBuf)-1])
|
||||||
} else {
|
} else {
|
||||||
bufLen := len(buf)
|
bufLen := len(buf)
|
||||||
buf = append(buf, v...)
|
buf = append(buf, v...)
|
||||||
|
@ -1853,13 +1853,12 @@ func (rc *resultColumn) resetKeepName() {
|
||||||
func (rc *resultColumn) addValue(v string) {
|
func (rc *resultColumn) addValue(v string) {
|
||||||
values := rc.values
|
values := rc.values
|
||||||
if len(values) > 0 && string(v) == values[len(values)-1] {
|
if len(values) > 0 && string(v) == values[len(values)-1] {
|
||||||
rc.values = append(rc.values, values[len(values)-1])
|
rc.values = append(values, values[len(values)-1])
|
||||||
return
|
} else {
|
||||||
|
bufLen := len(rc.buf)
|
||||||
|
rc.buf = append(rc.buf, v...)
|
||||||
|
rc.values = append(values, bytesutil.ToUnsafeString(rc.buf[bufLen:]))
|
||||||
}
|
}
|
||||||
|
|
||||||
bufLen := len(rc.buf)
|
|
||||||
rc.buf = append(rc.buf, v...)
|
|
||||||
rc.values = append(values, bytesutil.ToUnsafeString(rc.buf[bufLen:]))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func truncateTimestampToMonth(timestamp int64) int64 {
|
func truncateTimestampToMonth(timestamp int64) int64 {
|
||||||
|
|
|
@ -1395,6 +1395,7 @@ func TestQueryGetNeededColumns(t *testing.T) {
|
||||||
|
|
||||||
f(`* | sort by (f1)`, `*`, ``)
|
f(`* | sort by (f1)`, `*`, ``)
|
||||||
f(`* | sort by (f1) | fields f2`, `f1,f2`, ``)
|
f(`* | sort by (f1) | fields f2`, `f1,f2`, ``)
|
||||||
|
f(`_time:5m | sort by (_time) | fields foo`, `_time,foo`, ``)
|
||||||
f(`* | sort by (f1) | fields *`, `*`, ``)
|
f(`* | sort by (f1) | fields *`, `*`, ``)
|
||||||
f(`* | sort by (f1) | sort by (f2,f3 desc) desc`, `*`, ``)
|
f(`* | sort by (f1) | sort by (f2,f3 desc) desc`, `*`, ``)
|
||||||
f(`* | sort by (f1) | sort by (f2,f3 desc) desc | fields f4`, `f1,f2,f3,f4`, ``)
|
f(`* | sort by (f1) | sort by (f2,f3 desc) desc | fields f4`, `f1,f2,f3,f4`, ``)
|
||||||
|
|
Loading…
Reference in a new issue