You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/03/20 15:39:00 UTC

[jira] [Commented] (GEODE-6488) Query monitor may not remove all cancellation tasks if query object reused

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

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

Commit 3ffbc4183de59aa0603bea2e25f91a6e80a1d079 in geode's branch refs/heads/develop from Ryan McMahon
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=3ffbc41 ]

GEODE-6488: Migrating cancellation state to execution context (#3322)

This work solves two problems.  One is that the query cancellation task
reference in DefaultQuery could be overwritten and thus never removed
from monitoring upon successful completion of a query.  Second is that
once a query execution timed out once, the query object was in an
unusable state which is undesirable.

The solution is to attach the cancellation state to the execution
context rather than the query object, so that cancellation is associated
with each independent execution of a query rather than having
cancellation state that applies to the entire query object.

> Query monitor may not remove all cancellation tasks if query object reused
> --------------------------------------------------------------------------
>
>                 Key: GEODE-6488
>                 URL: https://issues.apache.org/jira/browse/GEODE-6488
>             Project: Geode
>          Issue Type: Bug
>          Components: querying
>            Reporter: Ryan McMahon
>            Assignee: Ryan McMahon
>            Priority: Major
>          Time Spent: 5h 40m
>  Remaining Estimate: 0h
>
> If a query instance is reused and monitored by multiple threads, it is possible that the cancellation tasks for each thread get  unscheduled.  This is due to a single cancellation task reference on the DefaultQuery which can get overwritten if multiple threads are using the same instance.
> Scenario:
>  # Thread 1 monitors and executes a query, and its cancellation task gets assigned to the query instance.
>  # Before Thread 1 stops monitoring, thread 2 monitors and executes using the same query instance, so Thread 1's cancellation task gets overwritten
>  # Both threads request that the query no longer be monitored, but only thread 2's cancellation task is unscheduled and removed, because we lost thread 1's cancellation tasks reference when it was overwritten.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)