FEATURE: Speedup content cache flush by using cte in findAncestorNodeAggregateIds
#5261
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Followup to #5221
ContentGraph::findParentNodeAggregates
becomes slower on bigger datasets. Due to the mass on executions on acr:replay
, this sums up very quickly. Via #5268 the query will be improved but this pr introducesContentGraph::findAncestorNodeAggregateIds
to make this operation as performant as possible.Adds comment for
CacheFlushingStrategy
strategiesIntroduces
ContentGraphInterface::findAncestorNodeAggregateIds
using native sql cte to speedup cache flushing. (see comment)Move test which creates illegal state to content graph package and use native sql to create the state to not run any catchup hooks. Previously we needed to handle the case of infinite loops to not crash:
fixes a bug where you cannot replay because the workspace is "missing" and no content graph exists
Upgrade instructions
Review instructions
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions