[ 
https://issues.apache.org/jira/browse/GEODE-5993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16688714#comment-16688714
 ] 

ASF subversion and git services commented on GEODE-5993:
--------------------------------------------------------

Commit 411ff8648f7413eb51efcf8f3a1fdccdcb6ec424 in geode's branch 
refs/heads/release/1.8.0 from [~propeller]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=411ff86 ]

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)

Reply via email to