mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
SEARCH-2112: When using Shard DB_ID_RANGE method, check firstTransaction only when Shard is not empty.
This commit is contained in:
+6
-1
@@ -278,7 +278,11 @@ public class MetadataTracker extends CoreStatePublisher implements Tracker
|
||||
}
|
||||
}
|
||||
|
||||
firstTransactions = client.getTransactions(minCommitTime, 0L, null, Long.MAX_VALUE, 1);
|
||||
// When a Shard with DB_ID_RANGE method is empty, minCommitTime is -1.
|
||||
// No firstTransaction checking is required for this case.
|
||||
if (minCommitTime != -1l) {
|
||||
|
||||
firstTransactions = client.getTransactions(minCommitTime, 0L, null, 2000l, 1);
|
||||
if (!firstTransactions.getTransactions().isEmpty())
|
||||
{
|
||||
Transaction firstTransaction = firstTransactions.getTransactions().get(0);
|
||||
@@ -305,6 +309,7 @@ public class MetadataTracker extends CoreStatePublisher implements Tracker
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Checks that the last TxId in solr is <= last TxId in repo
|
||||
if (!state.isCheckedLastTransactionTime())
|
||||
|
||||
Reference in New Issue
Block a user