[ https://issues.apache.org/jira/browse/GEODE-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15294339#comment-15294339 ]
ASF subversion and git services commented on GEODE-1246: -------------------------------------------------------- Commit 1af92d89108dbdb570f60fe4682edb77558f91e2 in incubator-geode's branch refs/heads/develop from [~dschneider] [ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=1af92d8 ] GEODE-1246: change async event pool to use all its threads The system property gemfire.Cache.EVENT_THREAD_LIMIT can be used to configure the max number of threads used for async cache listener invocation. It defaults to 16. > GemFireCacheImpl's eventThreadPool only uses one thread for asynchronously > invoking CacheListener callbacks > ----------------------------------------------------------------------------------------------------------- > > Key: GEODE-1246 > URL: https://issues.apache.org/jira/browse/GEODE-1246 > Project: Geode > Issue Type: Bug > Components: core, regions > Reporter: Barry Oglesby > Assignee: Darrel Schneider > > After enabling asynchronous {{CacheListener}} callbacks, the > {{CacheListener}} callbacks are processed serially by the same {{Message > Event Thread}} thread even though the {{eventThreadPool}} is configured with > 16 threads. > Configure asynchronous {{CacheListener}} callbacks like: > {noformat} > --J=-Dgemfire.Cache.ASYNC_EVENT_LISTENERS=true > {noformat} > The {{eventThreadPool}} is currently created like: > {noformat} > ArrayBlockingQueue q = new ArrayBlockingQueue(EVENT_QUEUE_LIMIT); > this.eventThreadPool = new PooledExecutorWithDMStats(q, 16, > this.cachePerfStats.getEventPoolHelper(), tf, 1000, new CallerRunsPolicy()); > {noformat} > At Darrel's suggestion, I replaced the {{eventThreadPool's > ArrayBlockingQueue}} with a {{SynchronousQueue}}, and that is working as > expected (all 16 threads are used): > {noformat} > this.eventThreadPool = new PooledExecutorWithDMStats(new SynchronousQueue(), > 16, this.cachePerfStats.getEventPoolHelper(), tf, 1000, new > CallerRunsPolicy()); > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)