You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (Created) (JIRA)" <ji...@apache.org> on 2011/11/04 17:57:50 UTC

[jira] [Created] (CASSANDRA-3455) Pending tasks should probably not include active tasks

Pending tasks should probably not include active tasks
------------------------------------------------------

                 Key: CASSANDRA-3455
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3455
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
    Affects Versions: 1.0.0, 0.8.0
            Reporter: Sylvain Lebresne
            Assignee: Sylvain Lebresne
            Priority: Minor
             Fix For: 0.8.8, 1.0.3
         Attachments: 0001-Update-pending-task-count.patch

In our TheadExecutor JMX metrics, 'pending tasks' includes 'active tasks' (because it's taskCount-completedTaskCount). I think this is counter-intuitive for most people (of course you could define 'pending tasks' as the 'pending of being fully executed' but you usually want pending to indicate if there is tasks that have to wait to be executed). Besides, I believe the initial intention was not to have pending to include active given the following comment:
{noformat}
    /**
     * Get the number of tasks waiting to be executed
     */
    public long getPendingTasks()
{noformat}
This ticket propose to fix that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3455) Pending tasks should probably not include active tasks

Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144172#comment-13144172 ] 

Jonathan Ellis commented on CASSANDRA-3455:
-------------------------------------------

Hmm.  The existing definition makes sense if you think of it as "not yet completed" instead of "waiting."  Which is more useful, because otherwise you can have a bunch of executors saying "zero pending tasks" but there is nothing to tell whether that is because the system isn't busy or you just haven't maxed out on executor threads yet.

TLDR: splitting into getActiveTasks/getQueueSize may make sense for 1.1, but we shouldn't break things before then.
                
> Pending tasks should probably not include active tasks
> ------------------------------------------------------
>
>                 Key: CASSANDRA-3455
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3455
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0, 1.0.0
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8.8, 1.0.3
>
>         Attachments: 0001-Update-pending-task-count.patch
>
>
> In our TheadExecutor JMX metrics, 'pending tasks' includes 'active tasks' (because it's taskCount-completedTaskCount). I think this is counter-intuitive for most people (of course you could define 'pending tasks' as the 'pending of being fully executed' but you usually want pending to indicate if there is tasks that have to wait to be executed). Besides, I believe the initial intention was not to have pending to include active given the following comment:
> {noformat}
>     /**
>      * Get the number of tasks waiting to be executed
>      */
>     public long getPendingTasks()
> {noformat}
> This ticket propose to fix that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3455) Pending tasks should probably not include active tasks

Posted by "Sylvain Lebresne (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sylvain Lebresne updated CASSANDRA-3455:
----------------------------------------

    Attachment: 0001-Update-pending-task-count.patch
    
> Pending tasks should probably not include active tasks
> ------------------------------------------------------
>
>                 Key: CASSANDRA-3455
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3455
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0, 1.0.0
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8.8, 1.0.3
>
>         Attachments: 0001-Update-pending-task-count.patch
>
>
> In our TheadExecutor JMX metrics, 'pending tasks' includes 'active tasks' (because it's taskCount-completedTaskCount). I think this is counter-intuitive for most people (of course you could define 'pending tasks' as the 'pending of being fully executed' but you usually want pending to indicate if there is tasks that have to wait to be executed). Besides, I believe the initial intention was not to have pending to include active given the following comment:
> {noformat}
>     /**
>      * Get the number of tasks waiting to be executed
>      */
>     public long getPendingTasks()
> {noformat}
> This ticket propose to fix that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-3455) Active tasks should be exposed separately from pending

Posted by "Jonathan Ellis (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-3455:
--------------------------------------

    Affects Version/s:     (was: 0.8.0)
                           (was: 1.0.0)
        Fix Version/s:     (was: 1.0.3)
                           (was: 0.8.8)
                       1.1
              Summary: Active tasks should be exposed separately from pending  (was: Pending tasks should probably not include active tasks)
    
> Active tasks should be exposed separately from pending
> ------------------------------------------------------
>
>                 Key: CASSANDRA-3455
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3455
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 1.1
>
>         Attachments: 0001-Update-pending-task-count.patch
>
>
> In our TheadExecutor JMX metrics, 'pending tasks' includes 'active tasks' (because it's taskCount-completedTaskCount). I think this is counter-intuitive for most people (of course you could define 'pending tasks' as the 'pending of being fully executed' but you usually want pending to indicate if there is tasks that have to wait to be executed). Besides, I believe the initial intention was not to have pending to include active given the following comment:
> {noformat}
>     /**
>      * Get the number of tasks waiting to be executed
>      */
>     public long getPendingTasks()
> {noformat}
> This ticket propose to fix that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-3455) Pending tasks should probably not include active tasks

Posted by "Sylvain Lebresne (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144188#comment-13144188 ] 

Sylvain Lebresne commented on CASSANDRA-3455:
---------------------------------------------

bq. Hmm. The existing definition makes sense if you think of it as "not yet completed" instead of "waiting."

Agreed, as said in the description I'm not arguing the existing definition doesn't make sense per se, I'm arguing that it's probably not what people most naturally infer when they just see the term 'pending tasks'. Obviously this is a bit objective, but it seems that everyone (me included) I asked so far was indeed believing that pending tasks were the 'waiting' tasks and were thus badly interpreting that number.

bq. Which is more useful, because otherwise you can have a bunch of executors saying "zero pending tasks" but there is nothing to tell whether that is because the system isn't busy or you just haven't maxed out on executor threads yet.

I'd argue that given we expose both active and pending, it's completely equivalent.

bq. TLDR: splitting into getActiveTasks/getQueueSize may make sense for 1.1, but we shouldn't break things before then

Agreed.
                
> Pending tasks should probably not include active tasks
> ------------------------------------------------------
>
>                 Key: CASSANDRA-3455
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3455
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.8.0, 1.0.0
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8.8, 1.0.3
>
>         Attachments: 0001-Update-pending-task-count.patch
>
>
> In our TheadExecutor JMX metrics, 'pending tasks' includes 'active tasks' (because it's taskCount-completedTaskCount). I think this is counter-intuitive for most people (of course you could define 'pending tasks' as the 'pending of being fully executed' but you usually want pending to indicate if there is tasks that have to wait to be executed). Besides, I believe the initial intention was not to have pending to include active given the following comment:
> {noformat}
>     /**
>      * Get the number of tasks waiting to be executed
>      */
>     public long getPendingTasks()
> {noformat}
> This ticket propose to fix that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CASSANDRA-3455) Active tasks should be exposed separately from pending

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis resolved CASSANDRA-3455.
---------------------------------------

    Resolution: Later
    
> Active tasks should be exposed separately from pending
> ------------------------------------------------------
>
>                 Key: CASSANDRA-3455
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3455
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 1.2.0
>
>         Attachments: 0001-Update-pending-task-count.patch
>
>
> In our TheadExecutor JMX metrics, 'pending tasks' includes 'active tasks' (because it's taskCount-completedTaskCount). I think this is counter-intuitive for most people (of course you could define 'pending tasks' as the 'pending of being fully executed' but you usually want pending to indicate if there is tasks that have to wait to be executed). Besides, I believe the initial intention was not to have pending to include active given the following comment:
> {noformat}
>     /**
>      * Get the number of tasks waiting to be executed
>      */
>     public long getPendingTasks()
> {noformat}
> This ticket propose to fix that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira