warning response not returned in gearman_client_do()

Bug #512743 reported by Dennis Schön
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman
Fix Released
Medium
Unassigned

Bug Description

I've the following testcase in Gearman::XS

($ret, $result) = $client->do('warning', 'blubb');
is($ret, GEARMAN_WORK_WARNING);
is($result, 'argh');
($ret, $result) = $client->do('warning', 'blubb');
is($ret, GEARMAN_SUCCESS);
is($result, 'blubb');

the warning function in the worker is:

sub warning {
  my ($job) = @_;
  $job->send_warning("argh");
  return $job->workload();
}

with the current gearmand trunk the tests fail as the first call to gearman_client_do() returns GEARMAN_IO_WAIT instead of GEARMAN_WORK_WARNING. The change has been introduced in commit #295. I've fixed it in my branch lp:~roccoblues/gearmand/fix-warning-response

As I'm not that familiar with the gearman_client_run_tasks() function in client.c, please check if I've not broken anything else. ;-) The tests still pass.

Related branches

Changed in gearmand:
status: New → Fix Committed
importance: Undecided → Medium
milestone: none → 0.12
Changed in gearmand:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.