mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
SEARCH-308: Solr6 Trackers can miss transactions following a rollback
This commit is contained in:
+1
-6
@@ -636,7 +636,6 @@ public class AclTracker extends AbstractTracker
|
||||
AclChangeSets aclChangeSets;
|
||||
BoundedDeque<AclChangeSet> changeSetsFound = new BoundedDeque<AclChangeSet>(100);
|
||||
HashSet<AclChangeSet> changeSetsIndexed = new LinkedHashSet<AclChangeSet>();
|
||||
TrackerState state = super.getTrackerState();
|
||||
long totalAclCount = 0;
|
||||
int aclCount = 0;
|
||||
|
||||
@@ -647,11 +646,7 @@ public class AclTracker extends AbstractTracker
|
||||
getWriteLock().acquire();
|
||||
//System.out.println("############# AclTracker acquire lock ################");
|
||||
|
||||
if(state == null)
|
||||
{
|
||||
// A rollback occurred. Break and let the next tracker get the state from the index.
|
||||
break;
|
||||
}
|
||||
TrackerState state = getTrackerState();
|
||||
|
||||
Long fromCommitTime = getChangeSetFromCommitTime(changeSetsFound, state.getLastGoodChangeSetCommitTimeInIndex());
|
||||
aclChangeSets = getSomeAclChangeSets(changeSetsFound, fromCommitTime, TIME_STEP_1_HR_IN_MS, 2000,
|
||||
|
||||
+1
-6
@@ -583,7 +583,6 @@ public class MetadataTracker extends AbstractTracker implements Tracker
|
||||
Transactions transactions;
|
||||
BoundedDeque<Transaction> txnsFound = new BoundedDeque<Transaction>(100);
|
||||
HashSet<Transaction> txsIndexed = new LinkedHashSet<>();
|
||||
TrackerState state = this.getTrackerState();
|
||||
long totalUpdatedDocs = 0;
|
||||
int docCount = 0;
|
||||
|
||||
@@ -594,11 +593,7 @@ public class MetadataTracker extends AbstractTracker implements Tracker
|
||||
getWriteLock().acquire();
|
||||
//System.out.println("######## Metadata Tracket Acquiring Write Lock ########");
|
||||
|
||||
if(state == null)
|
||||
{
|
||||
//A rollback occurred in the CommitTracker. Break the loop and let the next tracker create the next state.
|
||||
break;
|
||||
}
|
||||
TrackerState state = getTrackerState();
|
||||
|
||||
//System.out.println("######## Do Track Transactions ########:"+docCount);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user