replay queue loops indefinitely if there are any jobs in the queue

Bug #1054377 reported by Eskil Heyn Olsen
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Gearman
Fix Released
Critical
Brian Aker

Bug Description

The sqlite3 queue will loop indefinitely when replaying jobs from the queue.

This happens because it accidentally calls it's own ::add method while stepping over the table. Means the just read entry will appear at the end of the step, thus it'll repeatedly loop over the queue. Since it actually overwrites an existing row, it won't actually grow the table.

As a workaround, I've readded the old add_fn by making it available in the server structure passed to the queue. It's only available during replay.

Patch at http://bazaar.launchpad.net/~eskil/gearmand/gearmand/revision/651 and attached to ticket.

Related branches

Revision history for this message
Eskil Heyn Olsen (eskil) wrote :
Brian Aker (brianaker)
Changed in gearmand:
assignee: nobody → Brian Aker (brianaker)
Brian Aker (brianaker)
summary: - replay sqlite3 queue loops indefinitely if there are any jobs in the
- queue
+ replay queue loops indefinitely if there are any jobs in the queue
Brian Aker (brianaker)
Changed in gearmand:
milestone: none → 0.41
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Brian Aker (brianaker) wrote :

Found it, fix will hit trunk later this evening.

Brian Aker (brianaker)
Changed in gearmand:
status: In Progress → Fix Committed
Brian Aker (brianaker)
Changed in gearmand:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.