WordPress.org

Make WordPress Core

Opened 20 months ago

Closed 3 months ago

Last modified 3 months ago

#26676 closed defect (bug) (duplicate)

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

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

Description

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.

Links:

Change History (8)

comment:1 @SergeyBiryukov20 months ago

  • Component changed from General to Cache

comment:2 @dd3220 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 @Ipstenu20 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 @Ipstenu19 months ago

Just had this on trunk:

https://cloudup.com/cYpGVWkG5Re

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

comment:5 @wonderboymusic18 months ago

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

comment:6 @nacin17 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.

comment:7 @Ipstenu3 months ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #27669.

Technically 27669 is the dupe as it's older, but it's the same issue.

comment:8 @SergeyBiryukov3 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.