Skip to content

Commit

Permalink
Only create a new job from binlog when we have a tube name
Browse files Browse the repository at this point in the history
A READY or DELAYED entry in the binlog only has a tubename when the
job is first created. A release of a job with a delay will insert a new
entry without a tubename.

This fixes a problem when on replay of the binlog a record is
encountered that is modifying an existing job. But that job was originally
created in a prior binlog file that has been deleted becasue all
its jobs have been deleted. ie a modification to a job that has
already completed so we do not need to create it
  • Loading branch information
gbarr committed May 21, 2009
1 parent 5192ce5 commit 21b67ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ binlog_read_one(int fd, job binlog_jobs, const char *path)
break;
case JOB_STATE_READY:
case JOB_STATE_DELAYED:
if (!j) {
if (!j && namelen > 0) {
t = tube_find_or_make(tubename);
j = make_job_with_id(js.pri, js.delay, js.ttr, js.body_size,
t, js.id);
Expand Down

0 comments on commit 21b67ed

Please sign in to comment.