Page MenuHomePhabricator

Make disk-based setup caches more correct (but slower)
ClosedPublic

Authored by epriestley on Oct 19 2015, 4:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 4:52 PM
Unknown Object (File)
Fri, Dec 13, 9:46 PM
Unknown Object (File)
Thu, Dec 5, 7:59 PM
Unknown Object (File)
Sat, Nov 30, 10:20 AM
Unknown Object (File)
Sat, Nov 30, 6:40 AM
Unknown Object (File)
Fri, Nov 29, 5:00 PM
Unknown Object (File)
Mon, Nov 25, 11:06 PM
Unknown Object (File)
Mon, Nov 25, 2:06 PM
Subscribers
None

Details

Summary

Fixes T9599. When APC/APCu are not available, we fall back to a disk-based cache.

We try to share this cache across webserver processes like APC/APCu would be shared in order to improve performance, but are just kind of guessing how to coordinate it. From T9599, it sounds like we don't always get this right in every configuration.

Since this is complicated and error prone, just stop trying to do this. This cache has bad performance anyway (no production install should be using it), and we have much better APC/APCu setup instructions now than we did when I wrote this. Just using the PID is simpler and more correct.

Test Plan
  • Artificially disabled APC.
  • Reloaded the page, saw all the setup stuff run.
  • Reloaded the page, saw no setup stuff run (i.e., cache was hit).
  • Restarted the webserver.
  • Reloaded the page, saw all the setup stuff run.
  • Reloaded again, got a cache hit.

I don't really know how to reproduce the exact problem with the parent PID not working, but from T9599 it sounds like this fixed the issue and from my test plan we still appear to get correct behavior in the standard/common case.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Make disk-based setup caches more correct (but slower).
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
src/applications/cache/spec/PhabricatorDataCacheSpec.php
66–69

APC already has strong language ("dramatic" performance improvement) so I didn't strengthen that one.

chad edited edge metadata.
This revision is now accepted and ready to land.Oct 19 2015, 4:59 PM
This revision was automatically updated to reflect the committed changes.