Worker doesn't flush entire payload back to gearmand in non-block mode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman |
Fix Released
|
Medium
|
Brian Aker |
Bug Description
In non-block mode:
If the worker is attempting to return a very large data packet back to gearmand (which will forward it back to the client), then that operation sometimes fails.
gearman_
Here's how it looks like in strace:
sendto(6, "\x00\x52\
sendto(6, "aaaaaaaaaaaaaa
The EAGAIN triggers a GEARMAN_IO_WAIT return, that then bubbles up the stack, ending up with gearman_
Now gearman_
gearmand not getting the entire packet promised in the packet header decides the job has failed and communicates the same to the client.
The attached patch fixes this by retrying _job_send when IO_WAIT.
Changed in gearmand: | |
status: | In Progress → Fix Released |
Patch attached. Should import with patch -p2