You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Nirmal Ranganathan (JIRA)" <ji...@apache.org> on 2010/07/20 23:52:54 UTC

[jira] Issue Comment Edited: (CASSANDRA-1279) heisenbug in RoundRobinSchedulerTest

    [ https://issues.apache.org/jira/browse/CASSANDRA-1279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890473#action_12890473 ] 

Nirmal Ranganathan edited comment on CASSANDRA-1279 at 7/20/10 5:52 PM:
------------------------------------------------------------------------

The test is done with 15 simulated connections, 10 for K1(keyspace), 2 for K2 and 3 for k3. Requests came in the order of K1(1 thru 10), K2(11 thru 12), K3(13 thru15) and the test checked if K2 and K3 requests ran earlier then their request order. With the scheduler starting simultaneously, the requests were pretty much routed in order +/- the jvm thread scheduling order, hence the cause for the bug. 

Now the scheduler is paused still all the requests arrive and placed in their respective queues. When the scheduler is resumed, each pass retrieves one request from each keyspace queue, hence since K2 & K3 have only 2 and 3 requests, they get serviced faster than the order in which they arrived. This test just validates that the requests are RoundRobin and that's what we want to unit test.

      was (Author: rnirmal):
    The test is done with 15 simulated connections, 10 for K1(keyspace), 2 for K2 and 3 for k3. Requests came in the order of K1(1 -10), K2(11-12), K3(13-15) and the test checked if K2 and K3 requests ran earlier then their request order. With the scheduler starting simultaneously, the requests were pretty much routed in order +/- the jvm thread scheduling order, hence the cause for the bug. 

Now the scheduler is paused still all the requests arrive and placed in their respective queues. When the scheduler is resumed, each pass retrieves one request from each keyspace queue, hence since K2 & K3 have only 2 and 3 requests, they get serviced faster than the order in which they arrived. This test just validates that the requests are RoundRobin and that's what we want to unit test.
  
> heisenbug in RoundRobinSchedulerTest
> ------------------------------------
>
>                 Key: CASSANDRA-1279
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1279
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.7
>            Reporter: Jonathan Ellis
>            Assignee: Nirmal Ranganathan
>             Fix For: 0.7
>
>         Attachments: Cassandra-1279-v2.patch, Cassandra-1279.patch
>
>
> Occasionally I see this error in the test suite:
>     [junit] Testcase: testScheduling(org.apache.cassandra.scheduler.RoundRobinSchedulerTest):	FAILED
>     [junit] 
>     [junit] junit.framework.AssertionFailedError: 
>     [junit] 	at org.apache.cassandra.scheduler.RoundRobinSchedulerTest.testScheduling(RoundRobinSchedulerTest.java:90)
>     [junit] 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.