You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Roland Gude (JIRA)" <ji...@apache.org> on 2012/09/17 09:53:07 UTC

[jira] [Created] (CASSANDRA-4670) LeveledCompaction destroys secondary indexes

Roland Gude created CASSANDRA-4670:
--------------------------------------

             Summary: LeveledCompaction destroys secondary indexes
                 Key: CASSANDRA-4670
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4670
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.1.5, 1.1.4
            Reporter: Roland Gude


When LeveledCompactionStrategy is active on a ColumnFamily with an Index enabled on TTL Columns, the Index is not working correctly, because the compaction is throwing away index data very aggressively.

Steps to reproduce:

create a cluster  with a columnfamily with an indexed column and leveled compaction:
create column family CorruptIndex
  with column_type = 'Standard'
  and comparator = 'TimeUUIDType'
  and default_validation_class = 'BytesType'
  and key_validation_class = 'BytesType'
  and read_repair_chance = 0.5
  and dclocal_read_repair_chance = 0.0
  and gc_grace = 864000
  and min_compaction_threshold = 4
  and max_compaction_threshold = 32
  and replicate_on_write = true
  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
  and caching = 'NONE'
  and column_metadata = [
    {column_name : '00000003-0000-1000-0000-000000000000',
    validation_class : BytesType,
    index_name : 'idx_corrupt',
    index_type : 0}];

in that cf insert expiring data (expiration date should be in the far future for the sake of this test)

query the data by index:
get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)

see results (should be correct for some time)

wait for leveled compaction to compact the index

query the data by index:
get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)

see results (are empty)


trigger rebuild index via nodetool
query the data by index:
get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)

should be corretc again
wait for leveled compaction to compact the index

query the data by index:
get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)

see results (are empty)


repeat until bored


--
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

[jira] [Resolved] (CASSANDRA-4670) LeveledCompaction destroys secondary indexes

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

Jonathan Ellis resolved CASSANDRA-4670.
---------------------------------------

    Resolution: Cannot Reproduce
    
> LeveledCompaction destroys secondary indexes
> --------------------------------------------
>
>                 Key: CASSANDRA-4670
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4670
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.4, 1.1.5
>            Reporter: Roland Gude
>         Attachments: compaction2.log, compaction.log
>
>
> When LeveledCompactionStrategy is active on a ColumnFamily with an Index enabled on TTL Columns, the Index is not working correctly, because the compaction is throwing away index data very aggressively.
> Steps to reproduce:
> create a cluster  with a columnfamily with an indexed column and leveled compaction:
> create column family CorruptIndex
>   with column_type = 'Standard'
>   and comparator = 'TimeUUIDType'
>   and default_validation_class = 'BytesType'
>   and key_validation_class = 'BytesType'
>   and read_repair_chance = 0.5
>   and dclocal_read_repair_chance = 0.0
>   and gc_grace = 864000
>   and min_compaction_threshold = 4
>   and max_compaction_threshold = 32
>   and replicate_on_write = true
>   and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
>   and caching = 'NONE'
>   and column_metadata = [
>     {column_name : '00000003-0000-1000-0000-000000000000',
>     validation_class : BytesType,
>     index_name : 'idx_corrupt',
>     index_type : 0}];
> in that cf insert expiring data (expiration date should be in the far future for the sake of this test)
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (should be correct for some time)
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> trigger rebuild index via nodetool
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> should be corretc again
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> repeat until bored

--
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

[jira] [Comment Edited] (CASSANDRA-4670) LeveledCompaction destroys secondary indexes

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

Roland Gude edited comment on CASSANDRA-4670 at 9/21/12 7:41 PM:
-----------------------------------------------------------------

ok the issue returned after a quite some time. This makes me beleive it is independant from LeveledCompaction and the reason i was not able to reproduce it with STCS at first was due to some other condition.

anyway... now there is a debug log.
compaction.log is a brief excerpt only containing lines concerning compaction.
                
      was (Author: rjtg):
    ok the issue returned after a quite some time. This makes me beleive it is independant from LeveledCompaction and the reason i was not able to reproduce it with STCS at first was due to some other condition.

                  
> LeveledCompaction destroys secondary indexes
> --------------------------------------------
>
>                 Key: CASSANDRA-4670
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4670
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.4, 1.1.5
>            Reporter: Roland Gude
>         Attachments: compaction.log
>
>
> When LeveledCompactionStrategy is active on a ColumnFamily with an Index enabled on TTL Columns, the Index is not working correctly, because the compaction is throwing away index data very aggressively.
> Steps to reproduce:
> create a cluster  with a columnfamily with an indexed column and leveled compaction:
> create column family CorruptIndex
>   with column_type = 'Standard'
>   and comparator = 'TimeUUIDType'
>   and default_validation_class = 'BytesType'
>   and key_validation_class = 'BytesType'
>   and read_repair_chance = 0.5
>   and dclocal_read_repair_chance = 0.0
>   and gc_grace = 864000
>   and min_compaction_threshold = 4
>   and max_compaction_threshold = 32
>   and replicate_on_write = true
>   and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
>   and caching = 'NONE'
>   and column_metadata = [
>     {column_name : '00000003-0000-1000-0000-000000000000',
>     validation_class : BytesType,
>     index_name : 'idx_corrupt',
>     index_type : 0}];
> in that cf insert expiring data (expiration date should be in the far future for the sake of this test)
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (should be correct for some time)
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> trigger rebuild index via nodetool
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> should be corretc again
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> repeat until bored

--
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

[jira] [Commented] (CASSANDRA-4670) LeveledCompaction destroys secondary indexes

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

Jonathan Ellis commented on CASSANDRA-4670:
-------------------------------------------

The "removed index entry for cleaned-up value" line is logged by KeysIndex.deleteColumn, which is called from two places:

- cleanup (which is never automatic)
- writes deleting out the index entry

So unless you're actually performing cleanups here, it doesn't look like a problem w/ compaction at all.
                
> LeveledCompaction destroys secondary indexes
> --------------------------------------------
>
>                 Key: CASSANDRA-4670
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4670
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.4, 1.1.5
>            Reporter: Roland Gude
>         Attachments: compaction2.log, compaction.log
>
>
> When LeveledCompactionStrategy is active on a ColumnFamily with an Index enabled on TTL Columns, the Index is not working correctly, because the compaction is throwing away index data very aggressively.
> Steps to reproduce:
> create a cluster  with a columnfamily with an indexed column and leveled compaction:
> create column family CorruptIndex
>   with column_type = 'Standard'
>   and comparator = 'TimeUUIDType'
>   and default_validation_class = 'BytesType'
>   and key_validation_class = 'BytesType'
>   and read_repair_chance = 0.5
>   and dclocal_read_repair_chance = 0.0
>   and gc_grace = 864000
>   and min_compaction_threshold = 4
>   and max_compaction_threshold = 32
>   and replicate_on_write = true
>   and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
>   and caching = 'NONE'
>   and column_metadata = [
>     {column_name : '00000003-0000-1000-0000-000000000000',
>     validation_class : BytesType,
>     index_name : 'idx_corrupt',
>     index_type : 0}];
> in that cf insert expiring data (expiration date should be in the far future for the sake of this test)
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (should be correct for some time)
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> trigger rebuild index via nodetool
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> should be corretc again
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> repeat until bored

--
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

[jira] [Commented] (CASSANDRA-4670) LeveledCompaction destroys secondary indexes

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

Roland Gude commented on CASSANDRA-4670:
----------------------------------------

well that line is due to a write, but it is an update, not a delete. The value is unchanged, only the ttl changed.

Each row in that cf represents some time series. the indexed column represents what the time series is about (the value is a part of the rowkey as well). everytime some event happens for that timeseries, the event is added to the row and the indexed column is updated in order to keep the row in the index a while longer.

as i stated on the mailing list: the exact same thing has been working with cassandra 0.7 for quite a while now.


                
> LeveledCompaction destroys secondary indexes
> --------------------------------------------
>
>                 Key: CASSANDRA-4670
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4670
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.4, 1.1.5
>            Reporter: Roland Gude
>         Attachments: compaction2.log, compaction.log
>
>
> When LeveledCompactionStrategy is active on a ColumnFamily with an Index enabled on TTL Columns, the Index is not working correctly, because the compaction is throwing away index data very aggressively.
> Steps to reproduce:
> create a cluster  with a columnfamily with an indexed column and leveled compaction:
> create column family CorruptIndex
>   with column_type = 'Standard'
>   and comparator = 'TimeUUIDType'
>   and default_validation_class = 'BytesType'
>   and key_validation_class = 'BytesType'
>   and read_repair_chance = 0.5
>   and dclocal_read_repair_chance = 0.0
>   and gc_grace = 864000
>   and min_compaction_threshold = 4
>   and max_compaction_threshold = 32
>   and replicate_on_write = true
>   and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
>   and caching = 'NONE'
>   and column_metadata = [
>     {column_name : '00000003-0000-1000-0000-000000000000',
>     validation_class : BytesType,
>     index_name : 'idx_corrupt',
>     index_type : 0}];
> in that cf insert expiring data (expiration date should be in the far future for the sake of this test)
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (should be correct for some time)
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> trigger rebuild index via nodetool
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> should be corretc again
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> repeat until bored

--
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

[jira] [Commented] (CASSANDRA-4670) LeveledCompaction destroys secondary indexes

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

Roland Gude commented on CASSANDRA-4670:
----------------------------------------

after restarting the cluster in debug mode the issue seems to have vanished, but unfortunately i have witnessed the same issue on another cluster using SizeTieredCompaction (It worked for roughly two days until it showed the issue).



                
> LeveledCompaction destroys secondary indexes
> --------------------------------------------
>
>                 Key: CASSANDRA-4670
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4670
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.4, 1.1.5
>            Reporter: Roland Gude
>
> When LeveledCompactionStrategy is active on a ColumnFamily with an Index enabled on TTL Columns, the Index is not working correctly, because the compaction is throwing away index data very aggressively.
> Steps to reproduce:
> create a cluster  with a columnfamily with an indexed column and leveled compaction:
> create column family CorruptIndex
>   with column_type = 'Standard'
>   and comparator = 'TimeUUIDType'
>   and default_validation_class = 'BytesType'
>   and key_validation_class = 'BytesType'
>   and read_repair_chance = 0.5
>   and dclocal_read_repair_chance = 0.0
>   and gc_grace = 864000
>   and min_compaction_threshold = 4
>   and max_compaction_threshold = 32
>   and replicate_on_write = true
>   and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
>   and caching = 'NONE'
>   and column_metadata = [
>     {column_name : '00000003-0000-1000-0000-000000000000',
>     validation_class : BytesType,
>     index_name : 'idx_corrupt',
>     index_type : 0}];
> in that cf insert expiring data (expiration date should be in the far future for the sake of this test)
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (should be correct for some time)
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> trigger rebuild index via nodetool
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> should be corretc again
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> repeat until bored

--
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

[jira] [Updated] (CASSANDRA-4670) LeveledCompaction destroys secondary indexes

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

Roland Gude updated CASSANDRA-4670:
-----------------------------------

    Attachment: compaction.log

ok the issue returned after a quite some time. This makes me beleive it is independant from LeveledCompaction and the reason i was not able to reproduce it with STCS at first was due to some other condition.

                
> LeveledCompaction destroys secondary indexes
> --------------------------------------------
>
>                 Key: CASSANDRA-4670
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4670
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.4, 1.1.5
>            Reporter: Roland Gude
>         Attachments: compaction.log
>
>
> When LeveledCompactionStrategy is active on a ColumnFamily with an Index enabled on TTL Columns, the Index is not working correctly, because the compaction is throwing away index data very aggressively.
> Steps to reproduce:
> create a cluster  with a columnfamily with an indexed column and leveled compaction:
> create column family CorruptIndex
>   with column_type = 'Standard'
>   and comparator = 'TimeUUIDType'
>   and default_validation_class = 'BytesType'
>   and key_validation_class = 'BytesType'
>   and read_repair_chance = 0.5
>   and dclocal_read_repair_chance = 0.0
>   and gc_grace = 864000
>   and min_compaction_threshold = 4
>   and max_compaction_threshold = 32
>   and replicate_on_write = true
>   and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
>   and caching = 'NONE'
>   and column_metadata = [
>     {column_name : '00000003-0000-1000-0000-000000000000',
>     validation_class : BytesType,
>     index_name : 'idx_corrupt',
>     index_type : 0}];
> in that cf insert expiring data (expiration date should be in the far future for the sake of this test)
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (should be correct for some time)
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> trigger rebuild index via nodetool
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> should be corretc again
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> repeat until bored

--
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

[jira] [Updated] (CASSANDRA-4670) LeveledCompaction destroys secondary indexes

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

Roland Gude updated CASSANDRA-4670:
-----------------------------------

    Attachment: compaction2.log

compaction2.log contains a little bit more info. still limited to lines about the relevant index - anything that was in the logs near by the compaction stuff.

                
> LeveledCompaction destroys secondary indexes
> --------------------------------------------
>
>                 Key: CASSANDRA-4670
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4670
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.4, 1.1.5
>            Reporter: Roland Gude
>         Attachments: compaction2.log, compaction.log
>
>
> When LeveledCompactionStrategy is active on a ColumnFamily with an Index enabled on TTL Columns, the Index is not working correctly, because the compaction is throwing away index data very aggressively.
> Steps to reproduce:
> create a cluster  with a columnfamily with an indexed column and leveled compaction:
> create column family CorruptIndex
>   with column_type = 'Standard'
>   and comparator = 'TimeUUIDType'
>   and default_validation_class = 'BytesType'
>   and key_validation_class = 'BytesType'
>   and read_repair_chance = 0.5
>   and dclocal_read_repair_chance = 0.0
>   and gc_grace = 864000
>   and min_compaction_threshold = 4
>   and max_compaction_threshold = 32
>   and replicate_on_write = true
>   and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
>   and caching = 'NONE'
>   and column_metadata = [
>     {column_name : '00000003-0000-1000-0000-000000000000',
>     validation_class : BytesType,
>     index_name : 'idx_corrupt',
>     index_type : 0}];
> in that cf insert expiring data (expiration date should be in the far future for the sake of this test)
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (should be correct for some time)
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> trigger rebuild index via nodetool
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> should be corretc again
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> repeat until bored

--
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

[jira] [Commented] (CASSANDRA-4670) LeveledCompaction destroys secondary indexes

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

Jonathan Ellis commented on CASSANDRA-4670:
-------------------------------------------

bq. The value is unchanged, only the ttl changed

An indexed update has 3 steps:

# normal memtable insert of the new value
# remove the old index entry, with the same timestamp it was inserted
# add the new index entry

I suppose if you were updating w/ the same timestamp as the old value, then you could end up with the delete from step 3 stomping the insert from step 3.
                
> LeveledCompaction destroys secondary indexes
> --------------------------------------------
>
>                 Key: CASSANDRA-4670
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4670
>             Project: Cassandra
>          Issue Type: Bug
>    Affects Versions: 1.1.4, 1.1.5
>            Reporter: Roland Gude
>         Attachments: compaction2.log, compaction.log
>
>
> When LeveledCompactionStrategy is active on a ColumnFamily with an Index enabled on TTL Columns, the Index is not working correctly, because the compaction is throwing away index data very aggressively.
> Steps to reproduce:
> create a cluster  with a columnfamily with an indexed column and leveled compaction:
> create column family CorruptIndex
>   with column_type = 'Standard'
>   and comparator = 'TimeUUIDType'
>   and default_validation_class = 'BytesType'
>   and key_validation_class = 'BytesType'
>   and read_repair_chance = 0.5
>   and dclocal_read_repair_chance = 0.0
>   and gc_grace = 864000
>   and min_compaction_threshold = 4
>   and max_compaction_threshold = 32
>   and replicate_on_write = true
>   and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
>   and caching = 'NONE'
>   and column_metadata = [
>     {column_name : '00000003-0000-1000-0000-000000000000',
>     validation_class : BytesType,
>     index_name : 'idx_corrupt',
>     index_type : 0}];
> in that cf insert expiring data (expiration date should be in the far future for the sake of this test)
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (should be correct for some time)
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> trigger rebuild index via nodetool
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> should be corretc again
> wait for leveled compaction to compact the index
> query the data by index:
> get CorruptIndex where 00000003-0000-1000-0000-000000000000=utf8(‘value’)
> see results (are empty)
> repeat until bored

--
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