mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-04 20:52:43 +01:00
(stable) Fix two cache issues (global settings; initial setup)
Summary: - Fixes T11995. This got moved but I missed renaming this callsite. - Fixes T11993. If you have valid credentials, but haven't run `storage upgrade` yet, we can hit this exception during setup. Just ignore it instead. Test Plan: - Saved global settings, no more fatal. - Changed `storage-namespace` to junk, loaded web UI with valid database credentials. {F2106358} Reviewers: chad Reviewed By: chad Maniphest Tasks: T11993, T11995 Differential Revision: https://secure.phabricator.com/D17024
This commit is contained in:
parent
3c511adb6f
commit
3cd0001d8b
2 changed files with 3 additions and 7 deletions
|
@ -82,12 +82,12 @@ abstract class PhabricatorSetupCheck extends Phobject {
|
||||||
AphrontWriteGuard::allowDangerousUnguardedWrites(true);
|
AphrontWriteGuard::allowDangerousUnguardedWrites(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$caught = null;
|
|
||||||
try {
|
try {
|
||||||
$db_cache = new PhabricatorKeyValueDatabaseCache();
|
$db_cache = new PhabricatorKeyValueDatabaseCache();
|
||||||
$db_cache->deleteKey('phabricator.setup.issue-keys');
|
$db_cache->deleteKey('phabricator.setup.issue-keys');
|
||||||
} catch (Exception $ex) {
|
} catch (Exception $ex) {
|
||||||
$caught = $ex;
|
// If we hit an exception here, just ignore it. In particular, this can
|
||||||
|
// happen on initial startup before the databases are initialized.
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($use_scope) {
|
if ($use_scope) {
|
||||||
|
@ -95,10 +95,6 @@ abstract class PhabricatorSetupCheck extends Phobject {
|
||||||
} else {
|
} else {
|
||||||
AphrontWriteGuard::allowDangerousUnguardedWrites(false);
|
AphrontWriteGuard::allowDangerousUnguardedWrites(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($caught) {
|
|
||||||
throw $caught;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final public static function setOpenSetupIssueKeys(
|
final public static function setOpenSetupIssueKeys(
|
||||||
|
|
|
@ -159,7 +159,7 @@ final class PhabricatorUserPreferencesEditor
|
||||||
$user_phid);
|
$user_phid);
|
||||||
} else {
|
} else {
|
||||||
$cache = PhabricatorCaches::getMutableStructureCache();
|
$cache = PhabricatorCaches::getMutableStructureCache();
|
||||||
$cache->deleteKey(PhabricatorUserPreferences::getGlobalCacheKey());
|
$cache->deleteKey(PhabricatorUser::getGlobalSettingsCacheKey());
|
||||||
|
|
||||||
PhabricatorUserCache::clearCacheForAllUsers(
|
PhabricatorUserCache::clearCacheForAllUsers(
|
||||||
PhabricatorUserPreferencesCacheType::KEY_PREFERENCES);
|
PhabricatorUserPreferencesCacheType::KEY_PREFERENCES);
|
||||||
|
|
Loading…
Reference in a new issue