-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call to a member function resolveAssociationEntries() on boolean {"detail":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function resolveAssociationEntries() on boolean at /www/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultQueryCache.php:140)"} #7266
Comments
+1 This issue started happening to me when I switched my redis https://aws.amazon.com/premiumsupport/knowledge-center/oom-command-not-allowed-redis/ |
Also on newer releases?
…On Wed, 15 Aug 2018, 06:41 javabudd, ***@***.***> wrote:
+1
This issue started happening to me when I switched my redis
maxmemory-policy to allkeys-lru
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7266 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJakJ8-mq2jbPd2iWhz8UMRSITWb-dNks5uQ6aSgaJpZM4Us3BS>
.
|
I'm currently on 2.6.2 |
Fixing the conditional is incorrect there: would need to change the fetch operation so that multiple misses don't become |
Can this be reproduced with a failing test case? |
I'll try and reproduce |
I create a new class extends RedisCache and change The problem was solved temporarily. |
Please don't suggest ugly workarounds when a solution here is possible:
1. Send a test case
2. Send a patch to the original code (including said test case)
…On Thu, 16 Aug 2018, 05:35 mingmingxianseng, ***@***.***> wrote:
## in Doctrine\Common\Cache\RedisCache.php +72
protected function doFetchMultiple(array $keys)
{
$fetchedItems = array_combine($keys, $this->redis->mget($keys));
// Redis mget returns false for keys that do not exist. So we need to filter those out unless it's the real data.
$foundItems = [];
foreach ($fetchedItems as $key => $value) {
# change this line to if (false !== $value )
if (false !== $value || $this->redis->exists($key)) {
$foundItems[$key] = $value;
}
}
return $foundItems;
}
I create a new class extends RedisCache and change false !== $value ||
$this->redis->exists($key) to false !== $value.
The problem was solved temporarily.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7266 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJakAam814lzIA1o08lnhQf9ZjzzR30ks5uROhpgaJpZM4Us3BS>
.
|
I don't think it's a code problem. but the fact is that a cache is not a legitimate entity identifier, it is a false, shouldn't we judge whether this cache is legal ? maybe it is a ugly workarounds, but it is really effective, isn't it . And in our project, there will be no false in cache. Forgive me for my poor English and my humble opinion. 😝 |
A cache miss can be emulated, and that's what should happen in the test
scenario
…On Fri, 17 Aug 2018, 09:22 mingmingxianseng, ***@***.***> wrote:
I don't think it's a code problem.
maybe I didn't find it.
maybe other code changed the cache.
maybe my other code effected it.
maybe redis's rules...eg..
It only happens in production environment in my project, so it is really
hard to reproduce.
but the fact is that a cache is not a legitimate entity identifier, it is
a false, shouldn't we judge whether this cache is legal ?
i think make this cache miss is always better than throw a fatal error.
so i took the interim plan as I mentioned in my last comment.
maybe it is a ugly workarounds, but it is really effective, isn't it .
And in our project, there will be no false in cache.
Forgive me for my poor English and my humble opinion. 😝
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7266 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJakBaqz_WAJUJrzY4BSlwzQCOKl5N3ks5uRm8fgaJpZM4Us3BS>
.
|
normal cache's value's type is object . but in this case , the cache's value is "false". |
Yes: let's put it in a test, reproduce the cache behavior there and figure out how to fix it afterwards (and only afterwards! Test comes first.) :-) |
Upgrading the Redis engine from 4 -> 5 seems to have alleviated the issue for me. |
Closing here due to missing test scenario. |
Same issue exists in |
The following mistakes occur occasionally: ``` Call to a member function resolveAssociationEntries() on boolean {"detail":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function resolveAssociationEntries() on boolean at /www/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultQueryCache.php:140)"} ``` On cache miss the parameter `$entityEntry` sometimes will be false. This fixes issue doctrine#7266.
The following mistakes occur occasionally: ``` Call to a member function resolveAssociationEntries() on boolean {"detail":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function resolveAssociationEntries() on boolean at /www/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultQueryCache.php:140)"} ``` On cache miss the parameter `$entityEntry` sometimes will be false. This fixes issue doctrine#7266.
The following mistakes occur occasionally: ``` Call to a member function resolveAssociationEntries() on boolean {"detail":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function resolveAssociationEntries() on boolean at /www/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultQueryCache.php:140)"} ``` On cache miss the parameter `$entityEntry` sometimes will be false. This fixes issue doctrine#7266.
The following mistakes occur occasionally: ``` Call to a member function resolveAssociationEntries() on boolean {"detail":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function resolveAssociationEntries() on boolean at /www/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultQueryCache.php:140)"} ``` On cache miss the parameter `$entityEntry` sometimes will be false. This fixes issue doctrine#7266.
v2.6.4 [](https://travis-ci.org/doctrine/orm) In this release we've fixes many bugs (including a performance regression) and made the v2.x series compatible with PHP 7.4. -------------------------------------------- - Total issues resolved: **11** - Total pull requests resolved: **32** - Total contributors: **30** Improvement ----------- - [7785: Fix "access array offset on value of type null" PHP 7.4 notices](doctrine#7785) thanks to @mlocati - [7142: Rename this repository to doctrine/orm](doctrine#7142) thanks to @greg0ire Bug ------------------ - [7821: Bug: doctrine#7820 paginator ignores dbal type conversions in identifiers](doctrine#7821) thanks to @Ocramius - [7778: Guard L2C regions against corrupted data](doctrine#7778) thanks to @umpirsky - [7767: PersistentCollection::matching() does not respect the collections native sorting](doctrine#7767) thanks to @stephanschuler - [7766: Respect collection orderBy meta when matching()](doctrine#7766) thanks to @stephanschuler - [7761: Do not modify UOW on PersistentCollection::clear() when owner has DEFFERED&doctrine#95;EXPLICIT change tracking policy](doctrine#7761) thanks to @paxal - [7750: Fix incorrect return of null values in L2C](doctrine#7750) thanks to @AlexSmerw - [7737: Fix MEMBER&doctrine#95;OF comparison when using criteria in query builder](doctrine#7737) thanks to @Smartel1 - [7735: Null in fields value in Cached Entity several times on day on high-load project.](doctrine#7735) thanks to @AlexSmerw - [7630: Fix doctrine#7629 - `scheduledForSynchronization` leaks memory when using `@ORM\ChangeTrackingPolicy("DEFERRED&doctrine#95;EXPLICIT")`](doctrine#7630) thanks to @yethee - [7528: Prevent `UnitOfWork` lookup for DBAL types specified in `Doctrine\ORM\Query#setParameter()`](doctrine#7528) thanks to @Ocramius - [7322: JoinedSubclassPersister pass identifier types on delete](doctrine#7322) thanks to @dennisenderink and @fred-jan - [7266: Call to a member function resolveAssociationEntries() on boolean {"detail":"&doctrine#91;object&doctrine#93; (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to a member function resolveAssociationEntries() on boolean at /www/vendor/doctrine/orm/lib/Doctrine/ORM/Cache/DefaultQueryCache.php:140)"}](doctrine#7266) thanks to @mingmingxianseng - [4632: DDC-3789: Paginator does not convert entity ids if they are value objects](doctrine#4632) thanks to @doctrinebot Documentation ------------- - [7818: Add note into docs about not using SimpleAnnotationReader](doctrine#7818) thanks to @SenseException - [7791: Fix preFlush event documentation stating incorrectly that flush can be called safely](doctrine#7791) thanks to @Steveb-p - [7753: Add ORM annotations in getting-started docs](doctrine#7753) thanks to @SenseException and @wajdijurry - [7744: Fixed a typo-error](doctrine#7744) thanks to @noobshow - [7732: &doctrine#91;Documentation&doctrine#93; Missing comma fix](doctrine#7732) thanks to @lchrusciel - [7729: Update DATE&doctrine#95;ADD and DATE&doctrine#95;SUB docs](doctrine#7729) thanks to @JoppeDC - [7672: Added cross-links to relevant documentation](doctrine#7672) thanks to @jschaedl - [7612: Update ordered-associations.rst](doctrine#7612) thanks to @spirlici - [7610: Change APC to OPcache in improving-performance.rst ](doctrine#7610) thanks to @smtchahal - [7596: Correct method names and broken link in docs](doctrine#7596) thanks to @mbessolov - [7577: Fix of single link to dbal docs in advanced-configuration.rst](doctrine#7577) thanks to @SenseException - [7572: Remove codeigniter Framework example](doctrine#7572) thanks to @SenseException - [7571: Fix typo in inheritance mappings docs](doctrine#7571) thanks to @batwolf - [7557: Change Stackoverflow tag to doctrine-orm](doctrine#7557) thanks to @malarzm - [7551: &doctrine#91;2.6&doctrine#93; Migrate repository name doctrine/doctrine2 -> doctrine/orm](doctrine#7551) thanks to @Majkl578 - [7530: Documentation error typo fix: s/Used-defined/User-Defined](doctrine#7530) thanks to @vladyslavstartsev - [7519: doctrine#7518 Fixed type mismatch between `EntityRepository#&doctrine#95;&doctrine#95;construct()` and its documented constructor arguments](doctrine#7519) thanks to @koftikes - [7518: `EntityRepository::&doctrine#95;&doctrine#95;construct()` expects `Doctrine\ORM\EntityManager` instead of actual required `EntityManagerInterface`](doctrine#7518) thanks to @koftikes - [7490: Fix broken link](doctrine#7490) thanks to @vladyslavstartsev - [7483: Fixed a minor syntax issue](doctrine#7483) thanks to @javiereguiluz CI ----------------- - [7794: Fix test compatibility with DBAL 2.10.x-dev](doctrine#7794) thanks to @lcobucci - [7731: Replace custom install script with add-on](doctrine#7731) thanks to @greg0ire - [7473: Incremental CS checks in 2.x branches](doctrine#7473) thanks to @Majkl578
The following mistakes occur occasionally,and I can't find the solution
I think the parameter $entityEntry sometimes will be false , then occur the mistakes.
change
if ($entityEntry === null)
toif ($entityEntry === null || $entityEntry === false )
.Is this a good solution ?
I need your help. Thank you very much.
The text was updated successfully, but these errors were encountered: