Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-4146

Support Snapshot iterators for FSIndexes

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0SDK
    • Component/s: Core Java Framework
    • Labels:
      None

      Description

      Implementing "protectIndices" could have a consequence that some updated FSs could be removed from the indices by the framework, and addedback later. If the user code were iterating they might get unexpected ConcurrentModificationExceptions because of this.

      Extend the iterators to include "snapshot" iterators, that take a snapshot of the index contents at iterator creation time, and then use that to iterate over; this allows the iterator to avoid ConcurrentModificationExceptions.

      Do this in a manner to continue to support the "extended for" style of iterating, where you can write

      for (MyAnnotation : fsIndexProducingSnapshotIterators) { ... }
      

        Attachments

          Activity

            People

            • Assignee:
              schor Marshall Schor
              Reporter:
              schor Marshall Schor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: