mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-28 13:44:03 +00:00
fix(servers)!: validate UTF-8 in unchecked Prometheus validation mode (#10593)
fix(servers): validate UTF-8 in unchecked Prometheus validation mode
prom_validation_mode = "unchecked" built Strings from request bytes with
String::from_utf8_unchecked. Invalid UTF-8 in label values produced
invalid Strings, and the rows were written to WAL entries that fail to
decode on replay.
Make unchecked behave like lossy: invalid sequences are replaced with
U+FFFD. The config value is kept for compatibility.
(cherry picked from commit 3b2b67212a)
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
Co-authored-by: dennis zhuang <killme2008@gmail.com>