[
https://issues.apache.org/jira/browse/JCS-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15840362#comment-15840362
]
Thomas Vandahl commented on JCS-171:
------------------------------------
AbortPolicy is the default RejectionHandler for a ThreadPoolExecutor. I will
change it to CallerRunsPolicy, so these rejections should no longer be visible.
(They still occur, however)
Speaking of which, I let the thread pool count the number of rejections in
pooled mode and it was between 2.8 and 2.3 million for the test code running 50
million puts. This did not change much for a queue size between 20000 and 200.
The smallest number of rejections I got with a queue size of 500. I'll probably
need to stop trying to understand this behavior...
> Multiple CacheEventQueue.QProcessor spawned for the same cache region
> ---------------------------------------------------------------------
>
> Key: JCS-171
> URL: https://issues.apache.org/jira/browse/JCS-171
> Project: Commons JCS
> Issue Type: Bug
> Components: Composite Cache
> Affects Versions: jcs-2.0
> Reporter: Wiktor N
> Assignee: Thomas Vandahl
> Fix For: jcs-2.1
>
> Attachments: CacheEventQueue.patch, jcs-perf-test.zip
>
>
> I noticed that running on new version of JCS I get multiple
> CacheEventQueue.QProcessor thread. They spawn from time to time.
> I've checked recent changes and changes few things in r1774925 look
> suspicious:
> 1. In previous code we spawned a new thread in synchronized section. This got
> us a guarantee, that there will be no two threads trying to spawn a new
> thread in the same time. Maybe some locking is needed around thread creation?
> 2. QProcessor uses isAlive() method. But this is defined by Thread.isAlive()
> while it should probably check for CacheEventQueue.this.isAlive()
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)