[infinispan-issues] [JBoss JIRA] (ISPN-10232) PersistenceManagerImpl stop waits forever for active publishers to finish
Dan Berindei (Jira)
issues at jboss.org
Fri May 24 05:54:00 EDT 2019
[ https://issues.jboss.org/browse/ISPN-10232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Berindei updated ISPN-10232:
--------------------------------
Status: Open (was: New)
> PersistenceManagerImpl stop waits forever for active publishers to finish
> -------------------------------------------------------------------------
>
> Key: ISPN-10232
> URL: https://issues.jboss.org/browse/ISPN-10232
> Project: Infinispan
> Issue Type: Enhancement
> Components: Core
> Affects Versions: 10.0.0.Beta3, 9.4.13.Final
> Reporter: Dan Berindei
> Assignee: Will Burns
> Priority: Major
> Fix For: 10.0.0.Final
>
>
> {{PersistenceManagerImpl.stop()}} acquires all the permits of {{publisherSemaphore}} to make sure there is no ongoing iteration. But there is no timeout, so if the application is slowly going through all the entries in a huge cache it could block cache stop for a very long time.
> What's more, when a publisher finishes, the stop thread and other threads trying to start a new publisher have the same priority, and if the new publisher acquires a permit stop will have to wait for it to finish.
> We should limit the amount of time we wait for iterations to finish, similar to how {{TransactionTable}} only waits for ongoing transactions to finish for {{transaction.cacheStopTimeout}} millis. Ideally we would move {{cacheStopTimeout}} out of the transaction configuration and use it everywhere we could wait for user threads to finish doing their work before stopping.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the infinispan-issues
mailing list