mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
SEARCH-2117: Revert limit to 2000l for checking first transactions in database when checking the index and fix Integration Test.
This commit is contained in:
+4
-4
@@ -243,7 +243,7 @@ public class MetadataTracker extends CoreStatePublisher implements Tracker
|
||||
state.setCheckedFirstTransactionTime(true);
|
||||
log.info("No transactions found - no verification required");
|
||||
|
||||
firstTransactions = client.getTransactions(null, 0L, null, Long.MAX_VALUE, 1);
|
||||
firstTransactions = client.getTransactions(null, 0L, null, 2000l, 1);
|
||||
if (!firstTransactions.getTransactions().isEmpty())
|
||||
{
|
||||
Transaction firstTransaction = firstTransactions.getTransactions().get(0);
|
||||
@@ -278,7 +278,7 @@ public class MetadataTracker extends CoreStatePublisher implements Tracker
|
||||
}
|
||||
}
|
||||
|
||||
firstTransactions = client.getTransactions(minCommitTime, 0L, null, Long.MAX_VALUE, 1);
|
||||
firstTransactions = client.getTransactions(minCommitTime, 0L, null, 2000l, 1);
|
||||
if (!firstTransactions.getTransactions().isEmpty())
|
||||
{
|
||||
Transaction firstTransaction = firstTransactions.getTransactions().get(0);
|
||||
@@ -311,7 +311,7 @@ public class MetadataTracker extends CoreStatePublisher implements Tracker
|
||||
{
|
||||
if (firstTransactions == null)
|
||||
{
|
||||
firstTransactions = client.getTransactions(null, 0L, null, Long.MAX_VALUE, 1);
|
||||
firstTransactions = client.getTransactions(null, 0L, null, 2000l, 1);
|
||||
}
|
||||
|
||||
setLastTxCommitTimeAndTxIdInTrackerState(firstTransactions, state);
|
||||
@@ -1147,7 +1147,7 @@ public class MetadataTracker extends CoreStatePublisher implements Tracker
|
||||
{
|
||||
// DB TX Count
|
||||
long firstTransactionCommitTime = 0;
|
||||
Transactions firstTransactions = client.getTransactions(null, 0L, null, Long.MAX_VALUE, 1);
|
||||
Transactions firstTransactions = client.getTransactions(null, 0L, null, 2000l, 1);
|
||||
if(firstTransactions.getTransactions().size() > 0)
|
||||
{
|
||||
Transaction firstTransaction = firstTransactions.getTransactions().get(0);
|
||||
|
||||
+4
-1
@@ -127,7 +127,10 @@ public class AlfrescoSolrUtils
|
||||
long txnCommitTime = System.currentTimeMillis();
|
||||
Transaction transaction = new Transaction();
|
||||
transaction.setCommitTimeMs(txnCommitTime);
|
||||
transaction.setId(generateId());
|
||||
// A safer number for a transaction Id should be in [1-2000] range,
|
||||
// so this is the range accepted for the starting transaction number
|
||||
// on a SOLR Core
|
||||
transaction.setId(RANDOMIZER.nextInt(2000) + 1);
|
||||
transaction.setDeletes(deletes);
|
||||
transaction.setUpdates(updates);
|
||||
return transaction;
|
||||
|
||||
Reference in New Issue
Block a user