[wp-trac] [WordPress Trac] #37696: WP_Comment_Query looses sql_clauses with Object Cache

WordPress Trac noreply at wordpress.org
Thu Aug 18 06:50:21 UTC 2016


#37696: WP_Comment_Query looses sql_clauses with Object Cache
-------------------------------------+---------------------------
 Reporter:  Rarst                    |       Owner:  boonebgorges
     Type:  defect (bug)             |      Status:  reviewing
 Priority:  normal                   |   Milestone:  4.6.1
Component:  Comments                 |     Version:  4.6
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------------

Comment (by dd32):

 Replying to [comment:4 boonebgorges]:
 > I looked into this a bit more, and it does seem to be related to a
 partially primed cache. I'm uncertain how this happens in the wild, since
 all caches are linked to the same 'last_changed' incrementor - meaning
 that they should all stand or fall together. Clearly, though, there are
 cases where they can be out of sync, so the query in question should be
 more resilient.

 Caches evict data at different rates, the cached content may be evicted
 before the expiry, only half the caches related to a bit of code might get
 evicted at that point in time and others will live on for another year.
 Caches evict data based on key size, hit rate, usage, how full the
 underlying bucket it's in is, and seemingly sometimes `rand(0,1)`.
 In other words; No code should expect a cached value to exist, even if
 another piece of data stored at the same time still exists there, "It
 doesn't exist unless it's in my hands" (or variable as it may be).

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


More information about the wp-trac mailing list