Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-5562

AsyncCacheWriter should write all data to the back-end store before shutting down

XMLWordPrintable

      There is a chance that AsyncCacheWriter may stop before writing all midifications to the back-end store. This can primarily happen when writing the same keys in rapid succession. The coordinator thread will move these modifications to the head state (because of conflicts with tail), which is not checked before shutdown.

      There are two other minor race conditions if stop() is called concurrently to write() or clear() - these cannot happen in practice because PassivationManager is stopped before PersistenceManager:

      1. AsyncStoreCoordinator checks State.stopped and State.modifications.isEmpty() without holding the readLock(). This is not reliable because a concurrent write() or remove() may still add to the modifications map.

      2. clear() just replaces the head state, without copying the stopped flag that may have been set by a concurrent stop().

            Unassigned Unassigned
            kblees Karsten Blees (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: