You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2009/05/11 18:31:45 UTC

[jira] Created: (CASSANDRA-161) occasinal CME in getKeyRange

occasinal CME in getKeyRange
----------------------------

                 Key: CASSANDRA-161
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-161
             Project: Cassandra
          Issue Type: Bug
            Reporter: Jonathan Ellis
            Assignee: Jonathan Ellis


   [testng] java.util.ConcurrentModificationException
   [testng]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
   [testng]     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
   [testng]     at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
   [testng]     at org.apache.cassandra.db.Table.getKeyRange(Table.java:903)
   [testng]     at org.apache.cassandra.db.ColumnFamilyStoreTest.testCompactions(ColumnFamilyStoreTest.java:426)
   [testng] ... Removed 22 stack frames


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


[jira] Commented: (CASSANDRA-161) occasional CME in getKeyRange

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

Hudson commented on CASSANDRA-161:
----------------------------------

Integrated in Cassandra #73 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/73/])
    test to more reliably reproduce CME during range.  fix by locking out compact during range query.
patch by jbellis; reviewed by Eric Evans for 
fix race condition in compaction -- it was possible for a read thread to "snapshot" ssTables_, then have
the compactor thread delete those (after merging them into a new file) before the read thread checked
them.  Since the read thread's "snapshot" doesn't include the new merged sstable, it incorrectly tells
the caller that the key does not exist.
patch by jbellis; reviewed by Eric Evans for 
fix race condition between when memtable is replaced as the active one and when it's added to
the set of historical (pending flush) memtables.
patch by jbellis; reviewed by Eric Evans for 


> occasional CME in getKeyRange
> -----------------------------
>
>                 Key: CASSANDRA-161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-161
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>             Fix For: 0.3
>
>         Attachments: 0001-CASSANDRA-161-fix-race-condition-between-when-memtable.txt, 0002-fix-race-condition-in-compaction-it-was-possible-fo.txt, 0003-test-to-more-reliably-reproduce-CME-during-range.-f.patch
>
>
>    [testng] java.util.ConcurrentModificationException
>    [testng]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>    [testng]     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>    [testng]     at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>    [testng]     at org.apache.cassandra.db.Table.getKeyRange(Table.java:903)
>    [testng]     at org.apache.cassandra.db.ColumnFamilyStoreTest.testCompactions(ColumnFamilyStoreTest.java:426)
>    [testng] ... Removed 22 stack frames

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


[jira] Resolved: (CASSANDRA-161) occasinal CME in getKeyRange

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

Jonathan Ellis resolved CASSANDRA-161.
--------------------------------------

    Resolution: Fixed

committed

> occasinal CME in getKeyRange
> ----------------------------
>
>                 Key: CASSANDRA-161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-161
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>             Fix For: 0.3
>
>         Attachments: 0001-CASSANDRA-161-fix-race-condition-between-when-memtable.txt, 0002-fix-race-condition-in-compaction-it-was-possible-fo.txt, 0003-test-to-more-reliably-reproduce-CME-during-range.-f.patch
>
>
>    [testng] java.util.ConcurrentModificationException
>    [testng]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>    [testng]     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>    [testng]     at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>    [testng]     at org.apache.cassandra.db.Table.getKeyRange(Table.java:903)
>    [testng]     at org.apache.cassandra.db.ColumnFamilyStoreTest.testCompactions(ColumnFamilyStoreTest.java:426)
>    [testng] ... Removed 22 stack frames

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


[jira] Updated: (CASSANDRA-161) occasinal CME in getKeyRange

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

Jonathan Ellis updated CASSANDRA-161:
-------------------------------------

    Attachment: 0002-fix-race-condition-in-compaction-it-was-possible-fo.txt
                0001-CASSANDRA-161-fix-race-condition-between-when-memtable.txt

> occasinal CME in getKeyRange
> ----------------------------
>
>                 Key: CASSANDRA-161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-161
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>         Attachments: 0001-CASSANDRA-161-fix-race-condition-between-when-memtable.txt, 0002-fix-race-condition-in-compaction-it-was-possible-fo.txt
>
>
>    [testng] java.util.ConcurrentModificationException
>    [testng]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>    [testng]     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>    [testng]     at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>    [testng]     at org.apache.cassandra.db.Table.getKeyRange(Table.java:903)
>    [testng]     at org.apache.cassandra.db.ColumnFamilyStoreTest.testCompactions(ColumnFamilyStoreTest.java:426)
>    [testng] ... Removed 22 stack frames

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


[jira] Updated: (CASSANDRA-161) occasional CME in getKeyRange

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

Jonathan Ellis updated CASSANDRA-161:
-------------------------------------

    Summary: occasional CME in getKeyRange  (was: occasinal CME in getKeyRange)

> occasional CME in getKeyRange
> -----------------------------
>
>                 Key: CASSANDRA-161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-161
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>             Fix For: 0.3
>
>         Attachments: 0001-CASSANDRA-161-fix-race-condition-between-when-memtable.txt, 0002-fix-race-condition-in-compaction-it-was-possible-fo.txt, 0003-test-to-more-reliably-reproduce-CME-during-range.-f.patch
>
>
>    [testng] java.util.ConcurrentModificationException
>    [testng]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>    [testng]     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>    [testng]     at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>    [testng]     at org.apache.cassandra.db.Table.getKeyRange(Table.java:903)
>    [testng]     at org.apache.cassandra.db.ColumnFamilyStoreTest.testCompactions(ColumnFamilyStoreTest.java:426)
>    [testng] ... Removed 22 stack frames

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


[jira] Commented: (CASSANDRA-161) occasinal CME in getKeyRange

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

Jonathan Ellis commented on CASSANDRA-161:
------------------------------------------

(as part of 02 I switched to using a TreeSet which also fixes CASSANDRA-159.)

> occasinal CME in getKeyRange
> ----------------------------
>
>                 Key: CASSANDRA-161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-161
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>         Attachments: 0001-CASSANDRA-161-fix-race-condition-between-when-memtable.txt, 0002-fix-race-condition-in-compaction-it-was-possible-fo.txt
>
>
>    [testng] java.util.ConcurrentModificationException
>    [testng]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>    [testng]     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>    [testng]     at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>    [testng]     at org.apache.cassandra.db.Table.getKeyRange(Table.java:903)
>    [testng]     at org.apache.cassandra.db.ColumnFamilyStoreTest.testCompactions(ColumnFamilyStoreTest.java:426)
>    [testng] ... Removed 22 stack frames

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


[jira] Commented: (CASSANDRA-161) occasinal CME in getKeyRange

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708571#action_12708571 ] 

Eric Evans commented on CASSANDRA-161:
--------------------------------------

+1

> occasinal CME in getKeyRange
> ----------------------------
>
>                 Key: CASSANDRA-161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-161
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>         Attachments: 0001-CASSANDRA-161-fix-race-condition-between-when-memtable.txt, 0002-fix-race-condition-in-compaction-it-was-possible-fo.txt, 0003-test-to-more-reliably-reproduce-CME-during-range.-f.patch
>
>
>    [testng] java.util.ConcurrentModificationException
>    [testng]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>    [testng]     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>    [testng]     at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>    [testng]     at org.apache.cassandra.db.Table.getKeyRange(Table.java:903)
>    [testng]     at org.apache.cassandra.db.ColumnFamilyStoreTest.testCompactions(ColumnFamilyStoreTest.java:426)
>    [testng] ... Removed 22 stack frames

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


[jira] Issue Comment Edited: (CASSANDRA-161) occasinal CME in getKeyRange

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

Jonathan Ellis edited comment on CASSANDRA-161 at 5/12/09 8:51 AM:
-------------------------------------------------------------------

02
    fix race condition in compaction -- it was possible for a read thread to "snapshot" ssTables_, then have
    the compactor thread delete those (after merging them into a new file) before the read thread checked   
    them.  Since the read thread's "snapshot" doesn't include the new merged sstable, it incorrectly tells  
    the caller that the key does not exist.                                                                 

01
    fix race condition between when memtable is replaced as the active one and when it's added to
    the set of historical (pending flush) memtables                                                            

these patches also fix the heisenbugs in NameSort and TimeSort tests.

      was (Author: jbellis):
    02
    fix race condition in compaction -- it was possible for a read thread to "snapshot" ssTables_, then have
    the compactor thread delete those (after merging them into a new file) before the read thread checked   
    them.  Since the read thread's "snapshot" doesn't include the new merged sstable, it incorrectly tells  
    the caller that the key does not exist.                                                                 

01
    CASSANDRA-159 fix race condition between when memtable is replaced as the active one and when it's added to
    the set of historical (pending flush) memtables                                                            

these patches also fix the heisenbugs in NameSort and TimeSort tests.
  
> occasinal CME in getKeyRange
> ----------------------------
>
>                 Key: CASSANDRA-161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-161
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>         Attachments: 0001-CASSANDRA-161-fix-race-condition-between-when-memtable.txt, 0002-fix-race-condition-in-compaction-it-was-possible-fo.txt
>
>
>    [testng] java.util.ConcurrentModificationException
>    [testng]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>    [testng]     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>    [testng]     at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>    [testng]     at org.apache.cassandra.db.Table.getKeyRange(Table.java:903)
>    [testng]     at org.apache.cassandra.db.ColumnFamilyStoreTest.testCompactions(ColumnFamilyStoreTest.java:426)
>    [testng] ... Removed 22 stack frames

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


[jira] Updated: (CASSANDRA-161) occasinal CME in getKeyRange

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

Jonathan Ellis updated CASSANDRA-161:
-------------------------------------

    Attachment: 0003-test-to-more-reliably-reproduce-CME-during-range.-f.patch

test to more reliably reproduce CME during range.  fix by locking out compact during range query

> occasinal CME in getKeyRange
> ----------------------------
>
>                 Key: CASSANDRA-161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-161
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>         Attachments: 0001-CASSANDRA-161-fix-race-condition-between-when-memtable.txt, 0002-fix-race-condition-in-compaction-it-was-possible-fo.txt, 0003-test-to-more-reliably-reproduce-CME-during-range.-f.patch
>
>
>    [testng] java.util.ConcurrentModificationException
>    [testng]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>    [testng]     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>    [testng]     at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>    [testng]     at org.apache.cassandra.db.Table.getKeyRange(Table.java:903)
>    [testng]     at org.apache.cassandra.db.ColumnFamilyStoreTest.testCompactions(ColumnFamilyStoreTest.java:426)
>    [testng] ... Removed 22 stack frames

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


[jira] Updated: (CASSANDRA-161) occasinal CME in getKeyRange

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

Jonathan Ellis updated CASSANDRA-161:
-------------------------------------

    Fix Version/s: 0.3

> occasinal CME in getKeyRange
> ----------------------------
>
>                 Key: CASSANDRA-161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-161
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>             Fix For: 0.3
>
>         Attachments: 0001-CASSANDRA-161-fix-race-condition-between-when-memtable.txt, 0002-fix-race-condition-in-compaction-it-was-possible-fo.txt, 0003-test-to-more-reliably-reproduce-CME-during-range.-f.patch
>
>
>    [testng] java.util.ConcurrentModificationException
>    [testng]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>    [testng]     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>    [testng]     at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>    [testng]     at org.apache.cassandra.db.Table.getKeyRange(Table.java:903)
>    [testng]     at org.apache.cassandra.db.ColumnFamilyStoreTest.testCompactions(ColumnFamilyStoreTest.java:426)
>    [testng] ... Removed 22 stack frames

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


[jira] Commented: (CASSANDRA-161) occasinal CME in getKeyRange

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

Jonathan Ellis commented on CASSANDRA-161:
------------------------------------------

02
    fix race condition in compaction -- it was possible for a read thread to "snapshot" ssTables_, then have
    the compactor thread delete those (after merging them into a new file) before the read thread checked   
    them.  Since the read thread's "snapshot" doesn't include the new merged sstable, it incorrectly tells  
    the caller that the key does not exist.                                                                 

01
    CASSANDRA-159 fix race condition between when memtable is replaced as the active one and when it's added to
    the set of historical (pending flush) memtables                                                            

these patches also fix the heisenbugs in NameSort and TimeSort tests.

> occasinal CME in getKeyRange
> ----------------------------
>
>                 Key: CASSANDRA-161
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-161
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>         Attachments: 0001-CASSANDRA-161-fix-race-condition-between-when-memtable.txt, 0002-fix-race-condition-in-compaction-it-was-possible-fo.txt
>
>
>    [testng] java.util.ConcurrentModificationException
>    [testng]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>    [testng]     at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>    [testng]     at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010)
>    [testng]     at org.apache.cassandra.db.Table.getKeyRange(Table.java:903)
>    [testng]     at org.apache.cassandra.db.ColumnFamilyStoreTest.testCompactions(ColumnFamilyStoreTest.java:426)
>    [testng] ... Removed 22 stack frames

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