collectiveidea / delayed_job_active_record

ActiveRecord backend integration for DelayedJob 3.0+
MIT License
345 stars 336 forks source link

Locking raises errors when replicated over MySQL slaves #69

Open bradwright opened 11 years ago

bradwright commented 11 years ago

We're getting loads of things like this in our MySQL master/slave setup:

130731 13:14:46 [Warning] Statement may not be safe to log in statement format. Statement: UPDATE `delayed_jobs` SET `locked_at` = '2013-07-31 13:14:46', `locked_by` = 'host:server-1 pid:14412' WHERE ((run_at <= '2013-07-31 13:14:46' AND (locked_at IS NULL OR locked_at < '2013-07-31 09:14:46') OR locked_by = 'host:server-1 pid:14412') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1

which appears to be the same error as raised in collectiveidea/delayed_job#219. We're using 0.4.4 but the same code appears in the latest version.

palexvs commented 11 years ago

+1 0.4.4 MySQL 5.5

bradwright commented 11 years ago

Bump.