Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

57246: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3)
      57226: Reverse Merge back to the original now we know r57085 caused the two errors
         57222: Reverse Merge in attempt to work out which commit causes the two EmbeddedSolrTest test failures in https://bamboo.alfresco.com/bamboo/browse/ALF-ENTERPRISEV42BUGFIX-23
            57116: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1)
               56986: MNT-9829: Merged V4.1.5 (4.1.5.10) to V4.1-BUG-FIX (4.1.7)
                  56818: Fix for     MNT-9706  Big amount of alf_acl_change_set entries slowing down massively index times and prevent access to report / summary pages of SOLR
                  56848: Fix for     MNT-9706  Big amount of alf_acl_change_set entries slowing down massively index times and prevent access to report / summary pages of SOLR
                  - moved to join, count and group by    as having is causing issues.
                  56868: Fix for     MNT-9706  Big amount of alf_acl_change_set entries slowing down massively index times and prevent access to report / summary pages of SOLR
                  - also protect direct acl fetch with node exists test
                  - fix test to use a sensible loop .....
         57224: Reverse Merge in attempt to work out which commit causes the two EmbeddedSolrTest test failures in https://bamboo.alfresco.com/bamboo/browse/ALF-ENTERPRISEV42BUGFIX-23
            57082: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1)
               56949: Fix for     MNT-9456  SOLR: Index error count does not decrease even if you delete/fix the problematic doc 
               - counts undeleted docs


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61801 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-11 20:31:30 +00:00
parent 3584a3249a
commit 32b6e12b9e
2 changed files with 16 additions and 35 deletions

View File

@@ -21,6 +21,7 @@ package org.alfresco.repo.solr;
import java.io.InputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -138,25 +139,20 @@ public class SOLRTrackingComponentTest extends TestCase
{
List<AclChangeSet> cs = solrTrackingComponent.getAclChangeSets(null, null, null, null, 50);
assertTrue("Expected results to be limited in number", cs.size() <= 50);
List<Long> aclChangeSetIds = new ArrayList<Long>(50);
int totalAcls = 0;
for (AclChangeSet aclChangeSet : cs)
{
aclChangeSetIds.add(aclChangeSet.getId());
totalAcls += aclChangeSet.getAclCount();
}
int totalAclsCheck = 0;
Long fromAclId = null;
while (true)
for (AclChangeSet aclChangeSet : cs)
{
List<Acl> acls = solrTrackingComponent.getAcls(aclChangeSetIds, fromAclId, 2);
if (acls.size() == 0)
{
break;
}
List<Acl> acls = solrTrackingComponent.getAcls(Arrays.asList(new Long[]{aclChangeSet.getId()}), null, 200);
assertEquals(aclChangeSet.getAclCount(), acls.size());
totalAclsCheck += acls.size();
fromAclId = acls.get(acls.size() - 1).getId() + 1;
}
// Double check number of ACLs
assertEquals("ACL count should have matched", totalAcls, totalAclsCheck);
}