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

Support Snapshot iterators for FSIndexes

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.7.0SDK
    • Core Java Framework
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: