[wp-trac] [WordPress Trac] #31245: Replace alloptions with a key cache
WordPress Trac
noreply at wordpress.org
Sat Mar 21 07:49:01 UTC 2020
#31245: Replace alloptions with a key cache
-------------------------------------------------+-------------------------
Reporter: rmccue | Owner:
| SergeyBiryukov
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.3.1
Component: Options, Meta APIs | Version: 2.1
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing needs-dev- | Focuses:
note | performance
-------------------------------------------------+-------------------------
Comment (by dd32):
> note that this patch may have improved, but evidently did not fix the
potential for alloptions race conditions when used with an object cache.
As I noted above, this was never going to fix it 100%. It was only ever
going to reduce the instances of it, and hopefully limit those who
experience it to the more complex scenario's.
With plugins like Jetpack and specifically Jetpack Sync which make use of
a lot of options, when Primary/Secondary DB's come into play there's
always going to be a risk of multiple requests attempting to fill the
cache, and worse a request reading from the secondary DB before the
replication has occurred. WordPress can't really work around all of these
when Object Caches and Primary/Secondary DB interfaces are handled by
plugins.
IMHO the only way that this can be reliably fixed in those environments is
to have the Object Cache treat the `alloptions` cache differently than the
rest, like how [https://github.com/lcache/wp-lcache/pull/97 LCache],
[https://github.com/humanmade/memcache-object-cache/blob/master/object-
cache.php#L153-L231 Memcache], and [https://github.com/humanmade
/wordpress-pecl-memcached-object-cache/pull/1 Memcached] do (All mentioned
above in comments ~3 years ago). Something similar to those for the Redis
implementation would probably solve a bunch of problems, and based on my
understanding of Redis might even be easier than how it's implemented in
Memcache (due to the different APIs).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31245#comment:100>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list