Closed octo closed 9 years ago
@octo Thanks for helping clarify this! <3 <3 <3
Question: If true, doesn't this indicate that multithreading is a no-no? We could potentially read packets out of order and therefore overwrite fields out of band...
@untergeek what I outlined above only applies to parsing a single packet. State does not carry over to other packets, i.e. each packet starts with a clean slate / empty state.
I believe these issues are addressed in #16
Care to comment, @octo?
@untergeek the Ruby is weak in me, but as far as I can tell the patch looks reasonable. I think we can close this bug for now and trust in actual users opening a new one if a corner case slipped through ;) Thanks for taking care of this!
Thanks @octo
Hi, this is a follow-up to elastic/logstash#2014 and #6, which I don't believe to be fixed.
The coment in line 424 in collectd.rb reads:
Pretty much everything in this comment is wrong:
VALUES
part, not thePLUGIN
part. At this point all the fields of that metric are known and the metric should be copied to somewhere. You must not clear any fields afterwards though (with the exception of the values themselves, should your code set them in the struct / object / $state).PLUGIN
may well come before theTIME
– or not at all if it has the same value as the previous metric.HOST
may well be repeated.Creating a set of test vectors for the binary protocol is on my todo list and I'll happily drop a reference here once I have that.
Thanks for all your awesome work!