mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/protoparser/prometheus/parser.go (#970)
fix parse timestamp error if there are some whitespaces after timestamp
This commit is contained in:
parent
2a1550f341
commit
27f0261257
1 changed files with 2 additions and 0 deletions
|
@ -166,6 +166,8 @@ func (r *Row) unmarshal(s string, tagsPool []Tag, noEscapes bool) ([]Tag, error)
|
|||
// There is no timestamp - just a whitespace after the value.
|
||||
return tagsPool, nil
|
||||
}
|
||||
// There are some whitespaces after timestamp
|
||||
s = skipTrailingWhitespace(s)
|
||||
ts, err := fastfloat.Parse(s)
|
||||
if err != nil {
|
||||
return tagsPool, fmt.Errorf("cannot parse timestamp %q: %w", s, err)
|
||||
|
|
Loading…
Reference in a new issue