mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-10-01 14:41:19 +00:00
Merge pull request #906 from Alfresco/fix/SEARCH-2390_NoTransactionsDbIdRange
SEARCH-2390: Skip getting nodes from repository when no transactions …
This commit is contained in:
@@ -1052,7 +1052,9 @@ public class MetadataTracker extends ActivatableTracker
|
|||||||
* @throws JSONException
|
* @throws JSONException
|
||||||
*/
|
*/
|
||||||
private int indexBatchOfTransactions(List<Transaction> txBatch)
|
private int indexBatchOfTransactions(List<Transaction> txBatch)
|
||||||
throws AuthenticationException, IOException, JSONException, ExecutionException, InterruptedException {
|
throws AuthenticationException, IOException, JSONException, ExecutionException, InterruptedException
|
||||||
|
{
|
||||||
|
|
||||||
// Skip transactions without modifications (updates, deletes)
|
// Skip transactions without modifications (updates, deletes)
|
||||||
ArrayList<Long> txIds = new ArrayList<>();
|
ArrayList<Long> txIds = new ArrayList<>();
|
||||||
for (Transaction tx : txBatch)
|
for (Transaction tx : txBatch)
|
||||||
@@ -1062,7 +1064,13 @@ public class MetadataTracker extends ActivatableTracker
|
|||||||
txIds.add(tx.getId());
|
txIds.add(tx.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip getting nodes when no transactions left
|
||||||
|
if (txIds.size() == 0)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Get Nodes Id properties for every transaction
|
// Get Nodes Id properties for every transaction
|
||||||
GetNodesParameters gnp = new GetNodesParameters();
|
GetNodesParameters gnp = new GetNodesParameters();
|
||||||
gnp.setTransactionIds(txIds);
|
gnp.setTransactionIds(txIds);
|
||||||
|
Reference in New Issue
Block a user