-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
Overhaul ContentCacheFlusher #5175
Comments
I just have some followup question if i may ^^ so all our decisions are documented for the future :D Now we have the capability to flush a whole workspace if we want which is really powerful. 1.) What was the reasoning against more fine grained flushing on 2.) Also i played around to optimise Line 29 in d38fd9d
Edit i might actually recall us saying that discard is not that important to optimise as it will happen not that often.... and maybe optimising rebase will rather be worth our brain power. |
|
Instead of fine granular updating only the usage references on the nodes that were discarded, well throw away everything and then rely on the reapplied events what is kept. This is more consistent to how other parts react to publishing like the graph just forks a new content stream and doesnt care about the old data, the change projection behaves similar to the graph. And for the content cache flusher we had the discussion to use `discardedNodes` but opted against it and do a full flush there as well: neos#5175 (comment) This change allows us to get rid of the `discardedNodes` property (with dimensions) in the `WorkspaceWasPartiallyDiscarded` event.
Instead of fine granular updating only the usage references on the nodes that were discarded, well throw away everything and then rely on the reapplied events what is kept. This is more consistent to how other parts react to publishing like the graph just forks a new content stream and doesnt care about the old data, the change projection behaves similar to the graph. And for the content cache flusher we had the discussion to use `discardedNodes` but opted against it and do a full flush there as well: neos/neos-development-collection#5175 (comment) This change allows us to get rid of the `discardedNodes` property (with dimensions) in the `WorkspaceWasPartiallyDiscarded` event.
At the moment the ContentCacheFlusher can't flush caches discarded nodes. This seems to be caused by the fact, that after persisting the change (discard), the ContentCacheFlusher tries to identify his parents, which is not possible anymore.
To solve this issue, we need to do all node traversing operation BEFORE the persistence. Which should be done in the GraphProjectorCatchUpHookForCacheFlushing. So the ContentCacheFlusher does not need to do any node traversing anymore and simply flush all given caches.
Currently this doesn't have a effect, as the cacheEntryIdentifier is based on the contentStreamId, which leads to orphan cache entries after each new contentStream creation. On the other hand, the cache entry is not used anymore after discard, which means the same as a cache flush of the entry.
See also:
The text was updated successfully, but these errors were encountered: