zigo928 / xtrabackup-manager

Automatically exported from code.google.com/p/xtrabackup-manager
Other
0 stars 0 forks source link

Backup can fail in queueManager->checkFrontOfQueue due to bug in queueManager->getTicket #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
queueManager->getTicket will generally try to obtain a ticket in the queue for 
a backup up to 5 times. Due to a bug in the logic, it would return no ticket 
number at all if it was unable to obtain a ticket after 5 attempts.

This would cause an exception when later trying to use 
queueManager->checkFrontOfQueue.

Original issue reported on code.google.com by lachlan....@gmail.com on 27 Jan 2012 at 12:10

GoogleCodeExporter commented 8 years ago
Attempted fix in r211 by modifying the queueManager.

We now use a microsecond-based instead of second-based timestamp/time as a part 
of our entry_time for key uniqueness in the queue_tickets table and sleep a 
random number of microseconds between 100th of a second and a whole second 
between each attempt.

In addition it now correctly throws an exception after the 5th attempt if 
unsuccessful.

This should both reduce the likelihood for colliding attempts to obtain a 
ticket in the GLOBAL queue as well as ensure we correctly catch cases where we 
exhaust our retries doing so.

Original comment by lachlan....@gmail.com on 27 Jan 2012 at 12:15

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Appears this fix does not address the issue. I realised there is a much simpler 
way I can handle the queue mechanism that will avoid the need for this stuff.

Will try to push a fix to trunk today.

Original comment by lachlan....@gmail.com on 27 Jan 2012 at 6:02

GoogleCodeExporter commented 8 years ago
Confirmed fixed in rev 212

Original comment by lachlan....@gmail.com on 28 Jan 2012 at 2:08