-
-
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
!!!TASK: Use workspaceName instead of contentStreamId in AssetUsageProjection #5109
!!!TASK: Use workspaceName instead of contentStreamId in AssetUsageProjection #5109
Conversation
See Upgrade instructions above. |
e6198c9
to
38a3694
Compare
…handling new edges. Also remove unset properties
…ontentstreamid # Conflicts: # Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php
Current state is, that we might need to implement also the node hierarchy in the AssetUsageProjection, to be able to handle child nodes on deleted nodes. See: https://neos-project.slack.com/archives/C04PYL8H3/p1718654280746299 |
As discussed with @bwaidelich :
PROS:
CONS:
|
@dlubitz thanks for the summary. In general, just looking at the state should make a lot of edge cases simpler because it is much easier to reason about. But there is one special case and that's "materialized nodes" : This can lead to at least two weird situations in relation to asset usages: Scenario: asset is only used in the child workspace
As a graph:%%{init: { 'theme': 'base', 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': 'live'}} }%%
gitGraph
commit id:"prop x: asset1"
branch user
commit id:"prop y: foo"
checkout live
commit id:"prop x: ~"
IssueAs a result of the above, the workspace Note When building up the asset usage table from scratch (i.e. from the content graph state) it would add an entry to the usage table in this case because we can't easily differentiate whether the property was set in the workspace explicitly ConsequenceIt at least feels a bit weird, that the asset usage is not tracked in this case (and especially that it is when the usage tabel is built-up from the content graph state). But in reality this probably isn't a problem because: Note If, at some point, we allow to resolve conflicts in terms of "keep my change", there will have to be an event that reverts the asset removal – so the asset usage table will be updated correctly There are some more, similar, scenarios, e.g. when the asset property is not removed but changed to a different asset in the base workspace. But the resulting consequences are mostly similar to the case above. ConsiderationWhile writing this down, I was wondering whether that initial claim
really makes sense..
This way the resulting state would be the same for the initial setup and when executed via hook. Note I still think that we should count only one usage if the asset is the same in the child workspace, but we could filter out the duplicates at read time Copying all usages for each (initial) change might pose a performance issue though.. One comment regarding
We would only have to look into child workspaces with pending changes. And for those we could even find only potentially affected nodes by iterating through the events of the respective content stream (but that is an optimization that could always add lateron) |
Closed in favor of #5258 |
Upgrade instructions
For existing projects its nessecary to delete the
cr_*_p_neos_asset_usage
tables first.Then you need to setup the content repositorys again:
./flow cr:setup
And also run
./flow cr:projectionreplay AssetUsage
afterwards.Review instructions
resolves: #5084
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions