Hi!
We need to apply permissions for specific users on a folder with a lot of subfolders and nodes (approx 200'000 documents).
If we apply the permissions directly on the parent node, it will cause a timeout and it may create problems with solr at the end.
I can image that I have to start from the deepest folder and iterate backwards through the tree.
Can somebody give me a hint how to solve that problem in an efficient way?
Best regards
Kaffi
Solved! Go to Solution.
Hi
Where exactly is the timeout - the UI, the DB, ....
If you are adding a restriction to an existing access control list this operation is fast. If you are adding the first access entry to a node then there is a cascade update of nodes. In the first case there is no problem - you can plan for the second and create an access control list on nodes when you expect to add restrictions to avoid the cascade issue.
If you are in the second position you do not have to do this in one big transaction. There is a javascript variant of the API that will do the cascade update in batches. I do not think share uses that API.
It will not create problems with SOLR. SOLR does however have to reflect your changes and that may take some time to update 200,000 nodes. Using search services the cascade update for some cases is now split out from the normal flow of indexing updated nodes. It can not be split out for this case as all of the nodes are actually updated with a new ACL.
Iterating through the tree yourself will take longer and create more ACLs on every node that cascade update the ACL tree as the next node above is set.
Regards
Andy
Hi
Where exactly is the timeout - the UI, the DB, ....
If you are adding a restriction to an existing access control list this operation is fast. If you are adding the first access entry to a node then there is a cascade update of nodes. In the first case there is no problem - you can plan for the second and create an access control list on nodes when you expect to add restrictions to avoid the cascade issue.
If you are in the second position you do not have to do this in one big transaction. There is a javascript variant of the API that will do the cascade update in batches. I do not think share uses that API.
It will not create problems with SOLR. SOLR does however have to reflect your changes and that may take some time to update 200,000 nodes. Using search services the cascade update for some cases is now split out from the normal flow of indexing updated nodes. It can not be split out for this case as all of the nodes are actually updated with a new ACL.
Iterating through the tree yourself will take longer and create more ACLs on every node that cascade update the ACL tree as the next node above is set.
Regards
Andy
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.