mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
SEARCH-2390: Skip getting nodes from repository when no transactions left
Cherry picked from 2141634
This commit is contained in:
+9
-1
@@ -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