[infinispan-issues] [JBoss JIRA] (ISPN-5562) AsyncCacheWriter should write all data to the back-end store before shutting down

Karsten Blees (JIRA) issues at jboss.org
Wed Jun 17 15:13:02 EDT 2015


Karsten Blees created ISPN-5562:
-----------------------------------

             Summary: AsyncCacheWriter should write all data to the back-end store before shutting down
                 Key: ISPN-5562
                 URL: https://issues.jboss.org/browse/ISPN-5562
             Project: Infinispan
          Issue Type: Bug
          Components: Loaders and Stores
    Affects Versions: 7.0.0.Final, 6.0.0.Final, 5.2.0.Final
            Reporter: Karsten Blees


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().



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the infinispan-issues mailing list