Refresh Task Error

Which IIQ version are you inquiring about?

[8.3]

Share all details about your problem, including any error messages you may have received.

Hello ,

We are intermittently encountering a java.util.ConcurrentModificationException error during the refresh task.

The issue does not occur consistently, but when it happens, the task gets stuck and cannot complete.

All data structure manipulations in this process are already performed using iterators.

Any guidance or recommendations on how to prevent this issue or ensure the refresh process handles concurrent modifications safely would be appreciated.

Best regards

As the exception clearly says when something we are iterating on is modified.

  1. During refresh, don’t modify the Identity objects while iterating.
  2. Iterate over all identities and collect them in a separate list*
List<Identity> identitiesToUpdate = new ArrayList<>();

for (Identity identity : allIdentities) {
    // Read and check conditions, collect updates
    identitiesToUpdate.add(identity);
}
  1. After iteration is complete, apply all updates in a second loop:
for (Identity identity : identitiesToUpdate) {
    
}