2009/10/15 Philip Ross <[email protected]>:
> The attached patch checks namelen and sets it to 0 if it is >=
> MAX_TUBE_NAME_LEN.
>
> With this patch applied, beanstalkd starts up successfully, but I am
> still able to reserve the job that was deleted and the data for the
> released job is missing (so something still isn't quite right):
>
> I'll continue to do some investigation into this, but it'd be much
> appreciated if anyone could give me some pointers as to where to look.

I've now identified what is causing the problem. When the job is
released, binlog_write_job will not write out the job's body because
j->binlog is assigned. However, binlog_read_log_file assumes that
there will always be a body following the job and starts reading the
next job as the body. From that point on, the reading is out of sync.

The attached patch changes binlog_read_log_file so that it doesn't
read the body if the job has already been read from the binlog. The
patch also includes a better fix for the buffer overflow issue. It now
returns with binlog_warn since it doesn't make any sense to continue
reading the binlog file.

Regards,

Phil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"beanstalk-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/beanstalk-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: fix_read_delayed_job.patch
Description: Binary data

Reply via email to