[wp-trac] [WordPress Trac] #13158: Cron : some events may not be scheduled

WordPress Trac wp-trac at lists.automattic.com
Tue May 4 23:42:14 UTC 2010


#13158: Cron : some events may not be scheduled
--------------------------+-------------------------------------------------
 Reporter:  arena         |       Owner:  westi
     Type:  defect (bug)  |      Status:  new  
 Priority:  high          |   Milestone:  3.0  
Component:  Cron          |     Version:  3.0  
 Severity:  major         |    Keywords:       
--------------------------+-------------------------------------------------

Comment(by mdawaffe):

 The root problem is that we store the cron data in an array.  A naive get,
 process, set algorithm will always be prone to race conditions.

 We can rework those scheduling functions to move as much of the processing
 before the get so that there's less time between the get and the set, but
 that won't solve the problem.  Most of the bottleneck is probably in the
 db write, so reducing the time spent in PHP between get and set probably
 won't help that much.

 We could try putting in some locking (in the application layer) and maybe
 making a queue of stuff that needs to be added (one per row or we're back
 to where we started... transients?), but I don't think that will guarantee
 we prevent the race condition.  More complicated and easy to just move the
 race condition from one area to another.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13158#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list