Fix orphaned transient timeout cleanup - #13101
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
ef813e2 to
3fd402a
Compare
98a3500 to
55d4078
Compare
…resolve cross-network collision. - Updates delete_transient() and delete_site_transient() to always delete orphaned timeout rows. - Updates delete_expired_transients() to delete expired orphaned transient and site transient timeouts across single-site (options table) and multisite (sitemeta table). - Enforces b.site_id = a.site_id on both multisite cleanup queries to resolve cross-network data loss (#65969). - Adds comprehensive single-site and multisite test coverage using factory-created networks. - Documents the return value behavior in docblocks for delete_transient() and delete_site_transient(). Props team evolve. Fixes #65863. See #65969.
55d4078 to
84ce8c1
Compare
Trac ticket: https://core.trac.wordpress.org/ticket/65863
When the transient value row is missing, delete_transient() currently
does not remove the corresponding timeout row.
This changes delete_transient() and delete_site_transient() to always
attempt to delete their timeout rows.
Added regression tests covering orphaned transient timeout rows.
Tests: