ALF-3142: patch.updateDmPermissions takes too long to complete

- first upgrade test 100k set permissions/20 minutes (worst case each node has an ACL)
- single threaded

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21934 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2010-08-23 13:26:16 +00:00
parent 1745a5a116
commit b4aa44c2f7
2 changed files with 9 additions and 6 deletions

View File

@@ -1053,6 +1053,11 @@
<property name="fixesFromSchema"><value>0</value></property>
<property name="fixesToSchema"><value>124</value></property>
<property name="targetSchema"><value>125</value></property>
<property name="dependsOn" >
<list>
<ref bean="patch.fixNameCrcValues-2" />
</list>
</property>
<property name="accessControlListDao">
<ref bean="admNodeACLDAO"/>
</property>
@@ -1632,7 +1637,6 @@
<property name="dependsOn" >
<list>
<ref bean="patch.updateDmPermissions" />
<ref bean="patch.fixNameCrcValues-2" />
</list>
</property>
<property name="importerBootstrap">

View File

@@ -158,13 +158,12 @@ public class ADMAccessControlListDAO implements AccessControlListDAO
CounterSet result = new CounterSet();
// Do the children first
Acl existingAcl = null;
Long aclId = nodeDAO.getNodeAclId(nodeId);
if (aclId == null)
if (aclId != null)
{
// TODO: What happens here? It's causing NPEs
throw new IllegalStateException("Null aclId is causing NPEs. Node: " + nodeId);
existingAcl = aclDaoComponent.getAcl(aclId);
}
Acl existingAcl = aclDaoComponent.getAcl(aclId);
Long toInherit = null;
Long idToInheritFrom = null;
@@ -189,7 +188,7 @@ public class ADMAccessControlListDAO implements AccessControlListDAO
idToInheritFrom = newAcl.getId();
nodeDAO.setNodeAclId(nodeId, idToInheritFrom);
}
if (existingAcl.getAclType() == ACLType.SHARED)
else if (existingAcl.getAclType() == ACLType.SHARED)
{
// nothing to do just cascade into the children - we most likely did a bulk set above.
}