Make WordPress Core

Opened 15 months ago

Last modified 11 months ago

#26676 new defect (bug)

When upgrading code, object (or DB?) cache holds on to old versions

Reported by: Ipstenu Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.5.2
Component: Upgrade/Install Keywords: needs-patch
Focuses: Cc:


This is NOT a 3.8 bug, as I've seen it before, but now it's a little more prevalent. In seaching for enough forum posts, I tracked it all the way back to 3.5...

Scenario: You have object caching (APC, memecached, whatever) and when you upgrade via the UI, all the files get correctly downloaded -however- WP gets 'stuck' on a wrong screen. For example, one user was stuck on 'Your DB upgrade is complete' while another kept being told that 3.8 was ready to be installed, even though he'd already done it. In all cases, the files were verifiably WP 3.8, and it was just the cache being 'greedy' on the UI.

In all cases, flushing the server-side cache resolved the issues.

Caching Plugins: Of course this only happened with a site using a caching plugin, but it was not the same one. Batcache and Memcached Redux were the two I spotted.


Change History (6)

comment:1 @SergeyBiryukov15 months ago

  • Component changed from General to Cache

comment:2 @dd3215 months ago

This may be related to #26173. It may even be a total duplicate in the end.

That ticket lead to a big discovery (to me) though, some object caches ignore the flush command and since the DB upgrade step sets WP_INSTALLING which results in NOT updating the option values in the object cache, as it's relying upon the flush command.
The end result was that the DB version option in memory would always be out of date - This was fixed by specifically deleting the options cache rather than relying upon the flush.

The symptoms described and the threads linked, could vary between incomplete upgrades, and the above issue.

comment:3 @Ipstenu15 months ago

May as well tack on the weirdness where the admin styles didn't get flushed either thanks to object caching (that is someone with memcached had to flush cache to make Dashicons show up). I have a feeling it's all related.

comment:4 @Ipstenu14 months ago

Just had this on trunk:


Flushing the cache (in my case today, Memcached) manually works.

comment:5 @wonderboymusic13 months ago

  • Keywords needs-patch needs-unit-tests added
  • Milestone changed from Awaiting Review to 3.9

comment:6 @nacin11 months ago

  • Component changed from Cache API to Upgrade/Install
  • Keywords needs-unit-tests removed
  • Milestone changed from 3.9 to Awaiting Review

There's little indication of what what we need to fix here beyond #26173.

Note: See TracTickets for help on using tickets.