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
|
||||
*/
|
||||
private int indexBatchOfTransactions(List<Transaction> txBatch)
|
||||
throws AuthenticationException, IOException, JSONException, ExecutionException, InterruptedException {
|
||||
throws AuthenticationException, IOException, JSONException, ExecutionException, InterruptedException
|
||||
{
|
||||
|
||||
// Skip transactions without modifications (updates, deletes)
|
||||
ArrayList<Long> txIds = new ArrayList<>();
|
||||
for (Transaction tx : txBatch)
|
||||
@@ -1063,6 +1065,12 @@ public class MetadataTracker extends ActivatableTracker
|
||||
}
|
||||
}
|
||||
|
||||
// Skip getting nodes when no transactions left
|
||||
if (txIds.size() == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Get Nodes Id properties for every transaction
|
||||
GetNodesParameters gnp = new GetNodesParameters();
|
||||
gnp.setTransactionIds(txIds);
|
||||
|
Reference in New Issue
Block a user