[infinispan-issues] [JBoss JIRA] (ISPN-11727) Async Cache Writer is blocking
Will Burns (Jira)
issues at jboss.org
Wed Apr 29 15:57:38 EDT 2020
[ https://issues.redhat.com/browse/ISPN-11727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14066686#comment-14066686 ]
Will Burns commented on ISPN-11727:
-----------------------------------
Here is an occurence of a failure:
{code}
java.lang.AssertionError: Blocking call! jdk.internal.misc.Unsafe#park on thread Thread[non-blocking-thread-PreloadWithAsyncStoreTest-NodeA-p13490-t3,5,ISPN-non-blocking-thread-group]
at org.infinispan.util.CoreTestBlockHoundIntegration.lambda$applyTo$0(CoreTestBlockHoundIntegration.java:44)
at reactor.blockhound.BlockHound$Builder.lambda$install$8(BlockHound.java:383)
at reactor.blockhound.BlockHoundRuntime.checkBlocking(BlockHoundRuntime.java:89)
at java.base/jdk.internal.misc.Unsafe.park(Unsafe.java)
at java.base/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:885)
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:1009)
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1324)
at org.infinispan.persistence.async.BufferLock.writeLock(BufferLock.java:143)
at org.infinispan.persistence.async.AsyncCacheWriter.putAll(AsyncCacheWriter.java:278)
at org.infinispan.persistence.async.AsyncCacheWriter.lambda$bulkUpdate$1(AsyncCacheWriter.java:216)
at io.reactivex.rxjava3.internal.observers.ConsumerSingleObserver.onSuccess(ConsumerSingleObserver.java:62)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableToListSingle$ToListSubscriber.onComplete(FlowableToListSingle.java:102)
at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onComplete(BasicFuseableSubscriber.java:120)
at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onComplete(BasicFuseableSubscriber.java:120)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.checkTerminated(FlowableObserveOn.java:215)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:394)
at io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176)
at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker$BooleanRunnable.run(ExecutorScheduler.java:322)
at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker.runEager(ExecutorScheduler.java:287)
at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker.run(ExecutorScheduler.java:248)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
{code}
> Async Cache Writer is blocking
> ------------------------------
>
> Key: ISPN-11727
> URL: https://issues.redhat.com/browse/ISPN-11727
> Project: Infinispan
> Issue Type: Enhancement
> Components: Loaders and Stores
> Reporter: Will Burns
> Priority: Major
>
> The current AsyncCacheWriter is blocking on a few different levels.
> It first has a lock to add a modification to its queue, which is able to be configured by the end user. It may even be possible to configure a value so low that if a bulkUpdate is done that is larger than the configured value it may hang (needs to be confirmed).
> However this lock can and will block if an async update takes too long and the queue is full of writes. We should at least return a future that is complete when the value is written to the queue instead.
> We may want to even use something like https://github.com/IBM/java-async-util with their AsyncSemaphore to handle this queueing in a non blocking way. This however will require https://issues.redhat.com/browse/ISPN-10373 to be implemented first, before it can be made fully non blocking.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the infinispan-issues
mailing list