mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-21 22:32:41 +01:00
Use "@" to silence "GC list" warnings from "apc_store()" and "apcu_store()"
Summary: Fixes T13525. Since D21044, the intermittent GC list warnings are treated more severely and can become user-visible errors. Silence them, since this seems to be the only realistic response in most versions of APC/APCu. Test Plan: Will deploy. Maniphest Tasks: T13525 Differential Revision: https://secure.phabricator.com/D21179
This commit is contained in:
parent
aa20faeaa5
commit
5eaa0f24e7
2 changed files with 11 additions and 8 deletions
|
@ -47,11 +47,14 @@ final class PhutilAPCKeyValueCache extends PhutilKeyValueCache {
|
|||
// NOTE: Although modern APC supports passing an array to `apc_store()`,
|
||||
// it is not supported by older version of APC or by HPHP.
|
||||
|
||||
// See T13525 for discussion of use of "@" to silence this warning:
|
||||
// > GC cache entry "<some-key-name>" was on gc-list for <X> seconds
|
||||
|
||||
foreach ($keys as $key => $value) {
|
||||
if ($is_apcu) {
|
||||
apcu_store($key, $value, $ttl);
|
||||
@apcu_store($key, $value, $ttl);
|
||||
} else {
|
||||
apc_store($key, $value, $ttl);
|
||||
@apc_store($key, $value, $ttl);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -216,9 +216,9 @@ abstract class PhabricatorClientLimit {
|
|||
$bucket[$client_key] += $score;
|
||||
|
||||
if ($is_apcu) {
|
||||
apcu_store($bucket_key, $bucket);
|
||||
@apcu_store($bucket_key, $bucket);
|
||||
} else {
|
||||
apc_store($bucket_key, $bucket);
|
||||
@apc_store($bucket_key, $bucket);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -247,9 +247,9 @@ abstract class PhabricatorClientLimit {
|
|||
$cur = $this->getCurrentBucketID();
|
||||
if (!$min) {
|
||||
if ($is_apcu) {
|
||||
apcu_store($min_key, $cur);
|
||||
@apcu_store($min_key, $cur);
|
||||
} else {
|
||||
apc_store($min_key, $cur);
|
||||
@apc_store($min_key, $cur);
|
||||
}
|
||||
$min = $cur;
|
||||
}
|
||||
|
@ -262,10 +262,10 @@ abstract class PhabricatorClientLimit {
|
|||
$bucket_key = $this->getBucketCacheKey($cursor);
|
||||
if ($is_apcu) {
|
||||
apcu_delete($bucket_key);
|
||||
apcu_store($min_key, $cursor + 1);
|
||||
@apcu_store($min_key, $cursor + 1);
|
||||
} else {
|
||||
apc_delete($bucket_key);
|
||||
apc_store($min_key, $cursor + 1);
|
||||
@apc_store($min_key, $cursor + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue