Open Uabanur opened 6 years ago
Both the methods findTuple(...)
and findAllTuple(...)
are only used in methods that are synchronized. For this reason the exception cannot originates from them. Note that ConcurrentModificationExceptions
is generated when the content of an Iterable
is changed while it is subject of an iteration (foreach
statement). Please, can you share the stack trace you get?
When performing queryAll on a SequentialSpace in a SpaceRepository, ConcurrentModificationExceptions are occasionally thrown. The code where this is observed most often is:
Here the ConcurrentModificationException is thrown from the line with
queryAll(...)
. Looking in the SequentialSpace class, we see that the methodsfindTuple(...)
andfindAllTuples(...)
are not synchronised in the java monitor.This may be a deliberate choice to make it possible to query concurrently for several threads, but the concurrent exceptions are thrown since the found elements are returned, instead of a copy of their data.