Skip to content
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

BUG: findNodesByRelatedEntities creates too many cache entries #4876

Closed
1 task done
Sebobo opened this issue Feb 7, 2024 · 0 comments
Closed
1 task done

BUG: findNodesByRelatedEntities creates too many cache entries #4876

Sebobo opened this issue Feb 7, 2024 · 0 comments
Assignees

Comments

@Sebobo
Copy link
Member

Sebobo commented Feb 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When querying nodes by their related entities the NodeDataRepository creates a query with dynamic parameter names in

$constraints[] = '(LOWER(NEOSCR_TOSTRING(n.properties)) LIKE :entity' . md5($relatedIdentifier) . ' )';
.
This causes the creation of a new entry for each related entity in the Flow_Persistence_Doctrine cache.
F.e. deleting n assets, creates n entries, which causes performance issues as by default the cache is in the filesystem and accessing the cache slows down with a large number of entries.

In a project I had to delete 100.000s of assets which completely brought various requests in Neos to a crawl due to the cache getting slow with the amount of entries.

Expected Behavior

The query should be parameterised in a way that no large number of cache entries are generated and the existing ones can be reused.

Steps To Reproduce

Delete an asset from the media module and an additional cache entry will be generated in the Flow_Persistence_Doctrine cache.

Environment

- Flow: <= 8.3
- Neos: <= 8.3
- PHP: any

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant