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
F14058265: D14302.diff
Sun, Nov 17, 10:29 AM
F14011160: D14302.id34523.diff
Thu, Oct 31, 8:09 PM
F14002031: D14302.diff
Fri, Oct 25, 2:24 PM
F13985044: D14302.id.diff
Sun, Oct 20, 5:42 PM
Unknown Object (File)
Sep 21 2024, 11:24 PM
Unknown Object (File)
Sep 15 2024, 7:53 AM
Unknown Object (File)
Sep 14 2024, 5:17 PM
Unknown Object (File)
Sep 14 2024, 12:59 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.