avito-tech / bioyino

High performance and high-precision multithreaded StatsD server
The Unlicense
228 stars 22 forks source link

Parsing error "end of input" #57

Closed Karsonito closed 3 years ago

Karsonito commented 3 years ago

Incoming packet parsing error "end of input" with disabled multimessage

There's a problem in bioyino 0.7+ When multimessage = false every incoming message invokes such error: bioyino071_1 | Mar 01 16:18:20.840 WARN parsing error, error: Errors { position: PointerOffset(0x7f5264005d0c), errors: [Unexpected(Static("end of input")), Expected(Token(58))] }, position: 1491, buffer: "\u{0}\u{0}\u{0}...\u{0}\u{0}\u{0}", thread: main, program: bioyino

Reproduce:

[network]
multimessage = false
buffer-flush-time = 100
buffer-flush-length = 0
[metrics]
log-parse-errors = true

echo "test:1|c" | nc -u -w 0 127.0.0.1 8125

Versions: Tested v0.7.0, v0.7.1 and v0.8.0 I built a docker image from the official Dockerfile (see attached log) Also built binary and rpm for centos using cargo 1.45.1 and rustc 1.45.2

It's very important for dev enviroment to disable buffering for convenient testing. That's why multimessage = true is not a solution ) log-parse-errors = false also not ok because of incrementing resources.monitoring.bioyino.parse-error

Albibek commented 3 years ago

This should be fixed in 0.7.2. Please check