Re:What is a coder's worst nightmare? (2014)
by rcfox on Sunday November 22, 2015 @09:53AM
(#10610201)
Kinda sounds like you've got a race. Are you using threads at all?
[ Parent
| on HN ]
Re:What is a coder's worst nightmare? (2014)
by sethammons on Sunday November 22, 2015 @10:21AM
(#10610289)
AnyEvent for concurrency; no threads aside from the fork that causes child workers to pick up a message. The validation is in the parent, the child uses the data. The race would have to be something mutating the array, but I can only find one place where mutation happens. That part is a tight for each loop that appends source data to the target array. I will likely have to add logging, but the issue is so infrequent that the extra logging will be a mess due to the volume of data this service handles (around a billion requests per day, and maybe between zero and 200 requests will face this issue). Something will work out eventually; the bug must be exterminated ;)