[ https://issues.apache.org/jira/browse/GEODE-5993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682056#comment-16682056 ]
ASF subversion and git services commented on GEODE-5993: -------------------------------------------------------- Commit aab0198e8478d4246042b2eb889c8ce7e28bb52e in geode's branch refs/heads/develop from [~propeller] [ https://gitbox.apache.org/repos/asf?p=geode.git;h=aab0198 ] GEODE-5993: Eliminate race in monitorQueryThread() (#2818) A race existed between setting low memory in the heap monitor thread, and checking the low memory state in query monitoring thread. The cancelation executor was shut down and no longer accepting new tasks when this race occurred, causing a RejectedExecutionException. This commit solves that problem by encapsulating the scheduling behavior using the state design pattern. Co-authored-by: Ryan McMahon <rmcma...@pivotal.io> Co-authored-by: Bill Burcham <bburc...@pivotal.io> > QueryMonitor can throw RejectedExecutionException due to race > ------------------------------------------------------------- > > Key: GEODE-5993 > URL: https://issues.apache.org/jira/browse/GEODE-5993 > Project: Geode > Issue Type: Bug > Components: querying > Reporter: Ryan McMahon > Assignee: Ryan McMahon > Priority: Major > Labels: pull-request-available > Fix For: 1.8.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > It is possible for a RejectedExecutionException to be thrown due to the > following race: > Thread 1) > - Call monitorQueryThread() and pass LOW_MEMORY check > Thread 2) > - Call cancelAllQueriesDueToMemory() > - Shutdown executor > Thread 1) > - Schedule cancellation task results in RejectedExecutionException -- This message was sent by Atlassian JIRA (v7.6.3#76005)