[wp-trac] [WordPress Trac] #60457: Plugin Dependencies: Running update_option within wp-settings can be catastrophic for a high traffic site

WordPress Trac noreply at wordpress.org
Mon Feb 12 12:31:45 UTC 2024


#60457: Plugin Dependencies: Running update_option within wp-settings can be
catastrophic for a high traffic site
--------------------------+--------------------------
 Reporter:  dd32          |       Owner:  costdev
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  6.5
Component:  Plugins       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |     Focuses:  performance
--------------------------+--------------------------

Comment (by costdev):

 In [changeset:"57592" 57592]:
 {{{
 #!CommitTicketReference repository="" revision="57592"
 Upgrade/Install: Avoid `update_option()` calls during bootstrap.

 [57545] introduced the Plugin Dependencies feature, which contains a new
 `plugin_data` option.

 Previously, the `plugin_data` option was being updated during bootstrap
 and in `get_plugins()`, causing an error when using the install script as
 the options database table does not yet exist, and also risked an "out of
 sync" issue between the database and the cache on websites with heavy
 traffic.

 This removes the calls to `update_option()` during Core's bootstrap, and
 guards the call in `get_plugins()` to ensure that it doesn't run when
 WordPress is installing.

 Follow-up to [57545].

 Props desrosj, swisspidy, huzaifaalmesbah, afragen, dd32, azaozz, costdev.
 Fixes #60461. See #60457, #60491.
 }}}

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


More information about the wp-trac mailing list