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 81c1124a0f
commit 83a1249299
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

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