SEARCH-308: Solr6 Trackers can miss transactions following a rollback

This commit is contained in:
Joel
2017-02-02 14:28:35 -05:00
parent e62a4a1eec
commit 31524a19aa
2 changed files with 2 additions and 12 deletions
@@ -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,
@@ -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);