codeigniter4 / queue

Queues for the CodeIgniter 4 framework
https://queue.codeigniter.com/
MIT License
45 stars 12 forks source link

FOR UPDATE SKIP LOCKED #39

Closed rozpuh closed 7 months ago

rozpuh commented 8 months ago

MariaDb 10.5 not work query

SELECT *
FROM `queue_jobs`
WHERE `queue` = 'price_import'
AND `status` = 0
AND `available_at` <= 1707854930
AND `priority` IN ('default')
ORDER BY `available_at` ASC, `id` ASC
 LIMIT 1 FOR UPDATE SKIP LOCKED
michalsn commented 8 months ago

You need MariaDB 10.6: https://mariadb.com/kb/en/select/#skip-locked

adalgdev commented 7 months ago

Same issue for me in MySQL 5.7. Which databases versions are supported?

michalsn commented 7 months ago

You need MySQL 8.0.1: https://dev.mysql.com/blog-archive/mysql-8-0-1-using-skip-locked-and-nowait-to-handle-hot-rows/

MySQL 5.7 already reached EOL.

kenjis commented 7 months ago

I sent #40