queue icon indicating copy to clipboard operation
queue copied to clipboard

Dev: FOR UPDATE SKIP LOCKED issue when retrieving jobs in a queue

Open Martin1877 opened this issue 11 months ago • 2 comments

When retrieving jobs in a queue the function skipLocked() is called (QueueJobModel.php). The sql addon "FOR UPDATE SKIP LOCKED" is not available in new but not the newest MariaDB versions. This causes a "FALSE" on the query leading to an empty queue. Perhaps it's better to throw an exception than. Returning zero jobs is confusing.

Martin1877 avatar Apr 02 '24 17:04 Martin1877

MariaDB 10.6+ is required: https://queue.codeigniter.com/#requirements

michalsn avatar Apr 02 '24 17:04 michalsn

Yes, I've seen that. To throw an exception instead making the query false and then returning "no jobs found" is just something I missed :o= (I am working with the latest XAMPP for windows which covers MariaDB 10.4 only...)

Martin1877 avatar Apr 02 '24 17:04 Martin1877