Closed squareproton closed 9 years ago
I can simulate the bug, so a good prerequisite for a bug fix.
problem caused by joining 2 Gearman responses in one network packet. there is an error in parsing.
will be solved ASAP.
I commited a fix. please try a version from github. when you confirm the fix, I release a new version.
copy of your code is commited too, in folder test/BF25.
Nice one veny and a big thanks for the hard work you put into this! It's work like you are doing here that makes the opensource ecosystem such a pleasure to be a part of.
I'll try the new version tomorrow and let you know how it goes.
Yes. This issue is not longer reproducible at commit 0178f8632521dd97339fde7c06f90760de6455bb.
fix released in v0.2.1
I've been migrating a node application away from andris9/node-gearman to take advantage of the additional features available in GearmaNode (job priorities and background jobs) and also because it looks like andris9/node-gearman is no longer maintained. Unfortunately we have run into problems with GearmaNode not returning the correct data if multiple jobs are submitted to a client in quick succession. Am I using GearmaNode wrong?
GearmanNode 0.2.0 (the latest in npm) on node v0.10.37. Gearman 1.0.6 on Ubuntu 12.04.5 LTS. The minimal test case is below.
If this script is executed the following is returned.
Jobs 1-5 return valid JSON but job 6 returns
{"cnt":6}REH:printnode-pete:4409
which triggers a JSON parsing error and dumps everything to the console.Replacing the worker with a PHP version yields the same result.
If the client is replaced with andris9/node-gearman the script runs indefinitely which, I think, suggests the problem is with either the GearmaNode client or my usage of it.
Switching on debugging back for another run yields the following logs from gearmanode and gearman respectively.
GearmaNode
Gearman
gearmand --verbose DEBUG -l stderr