app/vlselect/logsql: properly handle the error from ParseLogMessage

This commit is contained in:
Aliaksandr Valialkin 2023-06-21 10:28:01 -07:00
parent caf4743e45
commit 772852ff4f
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -7,6 +7,7 @@ import (
"sync"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/bytesutil"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logjson"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logstorage"
)
@ -168,7 +169,9 @@ func (rs *rowsSorter) parseRows(src []byte) {
continue
}
p.ParseLogMessage(line)
if err := p.ParseLogMessage(line); err != nil {
logger.Panicf("BUG: unexpected invalid JSON line: %s", err)
}
timeValue := ""
fieldsBufLen := len(fieldsBuf)