You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@helix.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/03/18 23:18:38 UTC

[jira] [Commented] (HELIX-578) NPE while deleting a job from a recurrent job queue

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

ASF GitHub Bot commented on HELIX-578:
--------------------------------------

GitHub user lei-xia opened a pull request:

    https://github.com/apache/helix/pull/18

    [HELIX-578] NPE while deleting a job from a recurrent job queue.

    This is to fix the deletion job operation when trying to delete a job from a recurrent job queue. 
    New unit test added. mvn install package passed.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lei-xia/helix helix-0.6.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/helix/pull/18.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18
    
----
commit 944b16387b3ae5cf622b9d785dba17863341c084
Author: Lei Xia <lx...@linkedin.com>
Date:   2015-03-18T06:13:55Z

    [HELIX-578] NPE while deleting a job from a recurrent job queue.

----


> NPE while deleting a job from a recurrent job queue
> ---------------------------------------------------
>
>                 Key: HELIX-578
>                 URL: https://issues.apache.org/jira/browse/HELIX-578
>             Project: Apache Helix
>          Issue Type: Bug
>            Reporter: Karthiek
>            Assignee: Lei Xia
>            Priority: Critical
>
> Helix throws an NPE when we try to delete a job from recurrent job queue.
> Partial stacktrace:
> java.lang.NullPointerException
> 	at org.apache.helix.task.TaskDriver.deleteJob(TaskDriver.java:295)
> Helix is looking for workflow context's current state. 
> WorkflowContext wCtx = TaskUtil.getWorkflowContext(_propertyStore, queueName);
>     String workflowState =
>         (wCtx != null) ? wCtx.getWorkflowState().name() : TaskState.NOT_STARTED.name();
> But for a recurring workflow, there is no "state" in the parent workflow's context. Only the scheduled workflows will have a "state". Hence the NPE.
> To ensure that queue is stopped, Helix should look at the context of last-scheduled-workflow instead of the parent workflow.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)