@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Stop two special cache writes in read-only mode

Summary:
Ref T10769. The user availability cache write shouldn't happen in read-only mode, nor should the Differential parse cache write.

(We might want to turn off the availbility feature completely since it's potentially expensive if we can't cache it, but I think we're OK for now.)

Test Plan:
In read-only mode:

- Browsed as a user with an out-of-date availability cache.
- Loaded an older revision without cached parse data.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10769

Differential Revision: https://secure.phabricator.com/D15988

+8
+4
src/applications/differential/parser/DifferentialChangesetParser.php
··· 458 458 } 459 459 460 460 public function saveCache() { 461 + if (PhabricatorEnv::isReadOnly()) { 462 + return false; 463 + } 464 + 461 465 if ($this->highlightErrors) { 462 466 return false; 463 467 }
+4
src/applications/people/storage/PhabricatorUser.php
··· 968 968 * @task availability 969 969 */ 970 970 public function writeAvailabilityCache(array $availability, $ttl) { 971 + if (PhabricatorEnv::isReadOnly()) { 972 + return $this; 973 + } 974 + 971 975 $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); 972 976 queryfx( 973 977 $this->establishConnection('w'),