[wp-trac] [WordPress Trac] #57271: Cron unschedule / reschedule event errors

WordPress Trac noreply at wordpress.org
Tue Mar 5 17:56:42 UTC 2024


#57271: Cron unschedule / reschedule event errors
----------------------------------------+------------------------------
 Reporter:  domainsupport               |       Owner:  audrasjb
     Type:  defect (bug)                |      Status:  assigned
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Cron API                    |     Version:  6.0
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------------------

Comment (by j3gaming):

 Replying to [comment:54 emilycestmoi]:
 > Ok, I can confirm that the issue is due to the cron option_value being
 updated to the identical value that already exists in the database. That
 when the query runs:
 >
 >
 > {{{
 > UPDATE `wp_options` SET `option_value` = serialized_data WHERE
 `option_name` = 'cron'
 > }}}
 >
 > Rows matches: 1 but Changed: 0.
 >
 > This is why mysqli_affected_rows() returns 0 which triggers the whole
 error.
 >
 > I can see in my logs that a query with an UPDATE is ran with
 serialized_data (and it succeeds) just before the UPDATE that fails with
 the identical serialized_data.
 >
 > So the question is, can we safely ignore this error or do we need to
 have additional locking to prevent the query from running twice with the
 same serialized_data (or to reload the cron wp_options data before
 saving)?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57271#comment:55>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list