Replaying a large binlog increases delay of jobs #62

ddelbondio opened this Issue May 3, 2011 · 1 comment

2 participants


We have a pretty large binlog (55gb). Today when we restarted the server we found out that jobs were delayed longer then originally specified when inserting the job.
The output of stats-job (shorted) shows the issue (compare age, delay and time-left)

id: 64276765
tube: longDelay
state: delayed
age: 64951
delay: 64800
time-left: 687

Since the additional delay was never more than about the time beanstalk took to load its binlog i checked the source and found which looks like the cause of the issue to me.
I think now_usec() should be used there instead of started_at. Was there any reason to use started_at there instead of now_usec() (saving syscalls ?).

kr commented May 5, 2011

You're right, we should be using the current time.
I wasn't trying to avoid syscalls; this is just a bug.

@kr kr was assigned May 5, 2011
@kr kr closed this in 7c50a06 May 5, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment