[infinispan-issues] [JBoss JIRA] (ISPN-9722) Perform all CacheStore operations on a separate thread

Will Burns (Jira) issues at jboss.org
Wed May 29 08:55:00 EDT 2019


    [ https://issues.jboss.org/browse/ISPN-9722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13740010#comment-13740010 ] 

Will Burns commented on ISPN-9722:
----------------------------------

{quote}
Will Burns personally I'm a bit skeptical about using a separate thread pool: with the default CallerRunsPolicy we're always going to run some tasks in the caller thread, so it adds a lot of edge cases.
{quote}
We shouldn't ever be hitting the CallerRunsPolicy. The thread pool should have a large amount of threads and a large queue. We don't ever want to run this on the soon to be very precious CPU threads.

{quote}
And I wonder if we should make an exception when the store is asynchronous: blocking to wait for space in the write-behind queue is the same as blocking to wait for a free worker thread (or space in the thread pool queue).
{quote}
Adding support for actual asynchronous stores is a different PR after this. All of ours are currently sync with the given SPI, this needs to be rectified later with a new SPI to enable it. Then the running on a different thread can be decided by the store instead, however we aren't there yet. We shouldn't be blocking to wait for space in the queue, if we are that is a big problem as that would mean we are blocking the CPU thread when we shouldn't be.

> Perform all CacheStore operations on a separate thread
> ------------------------------------------------------
>
>                 Key: ISPN-9722
>                 URL: https://issues.jboss.org/browse/ISPN-9722
>             Project: Infinispan
>          Issue Type: Enhancement
>          Components: Loaders and Stores
>            Reporter: Will Burns
>            Assignee: Will Burns
>            Priority: Major
>             Fix For: 10.0.0.Final
>
>
> Persistence is one of the few remaining systems that are not non blocking. This needs to be remedied. We will eventually need to add an SPI that does this, but for now we need to offload the persistence operations to a different thread pool.
> This should only require changes in the PersistenceManager to return non blocking methods (ie. return CompletionStage). We should then update references to use non blocking when possible.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the infinispan-issues mailing list