-
Notifications
You must be signed in to change notification settings - Fork 2
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
Running the item ancestors propagation in a separate transaction should not introduce a breach allowing to create a cycle in the item relations graph #1149
base: master
Are you sure you want to change the base?
Conversation
… in a separate transaction doesn't introduce a breach allowing to create a cycle in the item relations graph
|
Few ideas to solve the problem:
Anyway, the ancestor propagation does not seem to be a long operation, so it looks reasonable to handle it "immediately" and so ensuring that the previous computation is done before changing the items_items relationship again (if this change the same part of "item tree" at least). But the main reason why this propagation was moved to full async is that changing item children is already a very slow operation... and so waiting the propagation to complete before responding to the http request (with a user waiting in front of his screen) does not work and does not really make sense. If the response could be sent as soon as the items_items has been changed and the propagation done immediately afterwards, that would be ok, but we still need a way to do it. |
But unfortunately it does as of #1058 (April 2024).
This PR contains a test reproducing the issue:
The test fails on the step 5: instead of returning 403, the request creates a cycle in the item relations graph and then both requests get stuck in infinite propagation process.