cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Strawson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-4973) Secondary Index stops returning rows
Date Mon, 19 Nov 2012 17:20:01 GMT

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

Daniel Strawson commented on CASSANDRA-4973:
--------------------------------------------

ok - I've just done the following:

1. run the query "get region where countryCode=GB".  This returned 13 rows OK.
2. stopped and started cassandra (kill pid).
3. ran the same query.  This returned no rows.

At this point there are no errors in the log file -

Next I'm doing the following:

4. run update column family region with column_metadata=[];
5. run update column family region with column_metadata=[ ...] ; (see original schema above)
6. ran the same query, it returned 13 rows OK.

here is the log file from the point where the restart happened:

{code}
 INFO [Thread-2] 2012-11-19 17:06:07,208 CassandraDaemon.java (line 212) Listening for thrift
clients...
 INFO [MemoryMeter:1] 2012-11-19 17:11:59,162 Memtable.java (line 213) CFS(Keyspace='Twickets',
ColumnFamily='tweet') liveRatio is 4.0713678844519965 (just-counted was 4.0713678844519965).
 calculation took 8ms for 103 columns
 INFO [MemoryMeter:1] 2012-11-19 17:11:59,164 Memtable.java (line 213) CFS(Keyspace='Twickets',
ColumnFamily='tweet.tweet_737461747573_idx') liveRatio is 25.840086759341418 (just-counted
was 21.256038647342994).  calculation took 1ms for 9 columns
 INFO [MemoryMeter:1] 2012-11-19 17:11:59,164 Memtable.java (line 213) CFS(Keyspace='Twickets',
ColumnFamily='tweet.tweet_status_idx') liveRatio is 9.66183574879227 (just-counted was 9.66183574879227).
 calculation took 0ms for 9 columns
 INFO [MemoryMeter:1] 2012-11-19 17:11:59,171 Memtable.java (line 213) CFS(Keyspace='Twickets',
ColumnFamily='tweet.tweet_tweetTwitterId_idx') liveRatio is 40.57971014492754 (just-counted
was 40.57971014492754).  calculation took 6ms for 9 columns
 INFO [RPC-Thread:95] 2012-11-19 17:13:06,280 MigrationManager.java (line 164) Update ColumnFamily
'Twickets/region' From org.apache.cassandra.config.CFMetaData@5922da6a[cfId=1048,ksName=Twickets,cfName=region,cfType=Standard,comparator=org.apache.cassandra.db.marshal.UTF8Type,subcolumncomparator=<null>,comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.UTF8Type,minCompactionThreshold=4,maxCompactionThreshold=32,keyAlias=<null>,columnAliases=[],valueAlias=<null>,column_metadata={java.nio.HeapByteBuffer[pos=0
lim=11 cap=11]=ColumnDefinition{name=636f756e747279436f6465, validator=org.apache.cassandra.db.marshal.UTF8Type,
index_type=KEYS, index_name='region_countryCode_idx'}, java.nio.HeapByteBuffer[pos=0 lim=5
cap=5]=ColumnDefinition{name=6c6162656c, validator=org.apache.cassandra.db.marshal.UTF8Type,
index_type=null, index_name='null'}},compactionStrategyClass=class org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.SnappyCompressor},bloomFilterFpChance=<null>,caching=ALL]
To org.apache.cassandra.config.CFMetaData@7f3192dd[cfId=1048,ksName=Twickets,cfName=region,cfType=Standard,comparator=org.apache.cassandra.db.marshal.UTF8Type,subcolumncomparator=<null>,comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.UTF8Type,minCompactionThreshold=4,maxCompactionThreshold=32,keyAlias=<null>,columnAliases=[],valueAlias=<null>,column_metadata={},compactionStrategyClass=class
org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.SnappyCompressor},bloomFilterFpChance=<null>,caching=ALL]
 INFO [MigrationStage:1] 2012-11-19 17:13:06,329 ColumnFamilyStore.java (line 659) Enqueuing
flush of Memtable-schema_columnfamilies@216957991(1170/1462 serialized/live bytes, 20 ops)
 INFO [FlushWriter:2] 2012-11-19 17:13:06,330 Memtable.java (line 264) Writing Memtable-schema_columnfamilies@216957991(1170/1462
serialized/live bytes, 20 ops)
 INFO [FlushWriter:2] 2012-11-19 17:13:06,547 Memtable.java (line 305) Completed flushing
/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hf-100-Data.db
(1236 bytes) for commitlog position ReplayPosition(segmentId=1353344762859, position=26876)
 INFO [MigrationStage:1] 2012-11-19 17:13:06,548 ColumnFamilyStore.java (line 659) Enqueuing
flush of Memtable-schema_columns@284615223(534/667 serialized/live bytes, 10 ops)
 INFO [FlushWriter:2] 2012-11-19 17:13:06,549 Memtable.java (line 264) Writing Memtable-schema_columns@284615223(534/667
serialized/live bytes, 10 ops)
 INFO [CompactionExecutor:9] 2012-11-19 17:13:06,559 CompactionTask.java (line 109) Compacting
[SSTableReader(path='/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hf-99-Data.db'),
SSTableReader(path='/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hf-100-Data.db'),
SSTableReader(path='/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hf-98-Data.db'),
SSTableReader(path='/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hf-97-Data.db')]
 INFO [FlushWriter:2] 2012-11-19 17:13:06,715 Memtable.java (line 305) Completed flushing
/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hf-65-Data.db (592 bytes)
for commitlog position ReplayPosition(segmentId=1353344762859, position=26876)
 INFO [CompactionExecutor:9] 2012-11-19 17:13:06,774 CompactionTask.java (line 221) Compacted
to [/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hf-101-Data.db,].
 42,483 to 38,815 (~91% of original) bytes for 3 keys at 0.177114MB/s.  Time: 209ms.
 INFO [MigrationStage:1] 2012-11-19 17:13:06,912 ColumnFamilyStore.java (line 659) Enqueuing
flush of Memtable-IndexInfo@759673793(48/60 serialized/live bytes, 1 ops)
 INFO [FlushWriter:2] 2012-11-19 17:13:06,913 Memtable.java (line 264) Writing Memtable-IndexInfo@759673793(48/60
serialized/live bytes, 1 ops)
 INFO [FlushWriter:2] 2012-11-19 17:13:07,084 Memtable.java (line 305) Completed flushing
/var/lib/cassandra/data/system/IndexInfo/system-IndexInfo-hf-95-Data.db (106 bytes) for commitlog
position ReplayPosition(segmentId=1353344762859, position=26991)
 INFO [RPC-Thread:112] 2012-11-19 17:14:15,128 MigrationManager.java (line 164) Update ColumnFamily
'Twickets/region' From org.apache.cassandra.config.CFMetaData@5922da6a[cfId=1048,ksName=Twickets,cfName=region,cfType=Standard,comparator=org.apache.cassandra.db.marshal.UTF8Type,subcolumncomparator=<null>,comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.UTF8Type,minCompactionThreshold=4,maxCompactionThreshold=32,keyAlias=<null>,columnAliases=[],valueAlias=<null>,column_metadata={},compactionStrategyClass=class
org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.SnappyCompressor},bloomFilterFpChance=<null>,caching=ALL]
To org.apache.cassandra.config.CFMetaData@17211aeb[cfId=1048,ksName=Twickets,cfName=region,cfType=Standard,comparator=org.apache.cassandra.db.marshal.UTF8Type,subcolumncomparator=<null>,comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.UTF8Type,minCompactionThreshold=4,maxCompactionThreshold=32,keyAlias=<null>,columnAliases=[],valueAlias=<null>,column_metadata={java.nio.HeapByteBuffer[pos=0
lim=11 cap=11]=ColumnDefinition{name=636f756e747279436f6465, validator=org.apache.cassandra.db.marshal.UTF8Type,
index_type=KEYS, index_name='region_countryCode_idx'}, java.nio.HeapByteBuffer[pos=0 lim=5
cap=5]=ColumnDefinition{name=6c6162656c, validator=org.apache.cassandra.db.marshal.UTF8Type,
index_type=null, index_name='null'}},compactionStrategyClass=class org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.SnappyCompressor},bloomFilterFpChance=<null>,caching=ALL]
 INFO [MigrationStage:1] 2012-11-19 17:14:15,138 ColumnFamilyStore.java (line 659) Enqueuing
flush of Memtable-schema_columnfamilies@2121156137(1170/1462 serialized/live bytes, 20 ops)
 INFO [FlushWriter:3] 2012-11-19 17:14:15,140 Memtable.java (line 264) Writing Memtable-schema_columnfamilies@2121156137(1170/1462
serialized/live bytes, 20 ops)
 INFO [FlushWriter:3] 2012-11-19 17:14:15,357 Memtable.java (line 305) Completed flushing
/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hf-102-Data.db
(1236 bytes) for commitlog position ReplayPosition(segmentId=1353344762859, position=32787)
 INFO [MigrationStage:1] 2012-11-19 17:14:15,359 ColumnFamilyStore.java (line 659) Enqueuing
flush of Memtable-schema_columns@811753466(624/780 serialized/live bytes, 10 ops)
 INFO [FlushWriter:3] 2012-11-19 17:14:15,360 Memtable.java (line 264) Writing Memtable-schema_columns@811753466(624/780
serialized/live bytes, 10 ops)
 INFO [FlushWriter:3] 2012-11-19 17:14:15,549 Memtable.java (line 305) Completed flushing
/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hf-66-Data.db (682 bytes)
for commitlog position ReplayPosition(segmentId=1353344762859, position=32787)
 INFO [CompactionExecutor:14] 2012-11-19 17:14:15,551 CompactionTask.java (line 109) Compacting
[SSTableReader(path='/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hf-65-Data.db'),
SSTableReader(path='/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hf-64-Data.db'),
SSTableReader(path='/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hf-66-Data.db'),
SSTableReader(path='/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hf-63-Data.db')]
 INFO [MigrationStage:1] 2012-11-19 17:14:15,719 AutoSavingCache.java (line 108) reading saved
cache /var/lib/cassandra/saved_caches/Twickets-region.region_countryCode_idx-KeyCache
 INFO [Creating index: region.region_countryCode_idx] 2012-11-19 17:14:15,723 SecondaryIndex.java
(line 168) Submitting index build of region.region_countryCode_idx for data in SSTableReader(path='/var/lib/cassandra/data/Twickets/region/Twickets-region-hd-1-Data.db')
 INFO [CompactionExecutor:14] 2012-11-19 17:14:15,740 CompactionTask.java (line 221) Compacted
to [/var/lib/cassandra/data/system/schema_columns/system-schema_columns-hf-67-Data.db,]. 
20,308 to 16,729 (~82% of original) bytes for 2 keys at 0.084862MB/s.  Time: 188ms.
 INFO [MemoryMeter:1] 2012-11-19 17:14:15,789 Memtable.java (line 213) CFS(Keyspace='Twickets',
ColumnFamily='region.region_countryCode_idx') liveRatio is 8.6908797417272 (just-counted was
8.6908797417272).  calculation took 5ms for 65 columns
 INFO [Creating index: region.region_countryCode_idx] 2012-11-19 17:14:15,812 ColumnFamilyStore.java
(line 659) Enqueuing flush of Memtable-region.region_countryCode_idx@885558881(1353/14698
serialized/live bytes, 71 ops)
 INFO [FlushWriter:3] 2012-11-19 17:14:15,813 Memtable.java (line 264) Writing Memtable-region.region_countryCode_idx@885558881(1353/14698
serialized/live bytes, 71 ops)
 INFO [FlushWriter:3] 2012-11-19 17:14:15,945 Memtable.java (line 305) Completed flushing
/var/lib/cassandra/data/Twickets/region/Twickets-region.region_countryCode_idx-hf-1-Data.db
(882 bytes) for commitlog position ReplayPosition(segmentId=1353344762859, position=32787)
 INFO [Creating index: region.region_countryCode_idx] 2012-11-19 17:14:15,946 ColumnFamilyStore.java
(line 659) Enqueuing flush of Memtable-IndexInfo@1280290904(44/55 serialized/live bytes, 1
ops)
 INFO [FlushWriter:3] 2012-11-19 17:14:15,947 Memtable.java (line 264) Writing Memtable-IndexInfo@1280290904(44/55
serialized/live bytes, 1 ops)
 INFO [FlushWriter:3] 2012-11-19 17:14:16,120 Memtable.java (line 305) Completed flushing
/var/lib/cassandra/data/system/IndexInfo/system-IndexInfo-hf-96-Data.db (102 bytes) for commitlog
position ReplayPosition(segmentId=1353344762859, position=32898)
 INFO [Creating index: region.region_countryCode_idx] 2012-11-19 17:14:16,121 SecondaryIndex.java
(line 209) Index build of region.region_countryCode_idx complete
 INFO [CompactionExecutor:14] 2012-11-19 17:14:16,122 CompactionTask.java (line 109) Compacting
[SSTableReader(path='/var/lib/cassandra/data/system/IndexInfo/system-IndexInfo-hf-95-Data.db'),
SSTableReader(path='/var/lib/cassandra/data/system/IndexInfo/system-IndexInfo-hf-96-Data.db'),
SSTableReader(path='/var/lib/cassandra/data/system/IndexInfo/system-IndexInfo-hf-94-Data.db'),
SSTableReader(path='/var/lib/cassandra/data/system/IndexInfo/system-IndexInfo-hf-93-Data.db')]
 INFO [CompactionExecutor:14] 2012-11-19 17:14:16,299 CompactionTask.java (line 221) Compacted
to [/var/lib/cassandra/data/system/IndexInfo/system-IndexInfo-hf-97-Data.db,].  1,727 to 1,461
(~84% of original) bytes for 1 keys at 0.007917MB/s.  Time: 176ms.

{code}


                
> Secondary Index stops returning rows
> ------------------------------------
>
>                 Key: CASSANDRA-4973
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4973
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.2, 1.1.6
>         Environment: Centos 6.3, Java 1.6.0_35, cass. 1.1.2 upgraded to 1.1.6
>            Reporter: Daniel Strawson
>
> I've been using cassandra on a project for a little while in development and have recently
suddenly started having an issue where the secondary index stops working, this is happening
on my new production system, we are not yet live.   Things work ok one moment, then suddenly
queries to the cf through the secondary index stop returning data.  I've seen it happen on
3 CFs. I've tried:
> - various nodetools repair / scrub / rebuild_indexes options, none seem to make a difference.
> - Doing a 'update column family <whatever> with column_metadata=[]' then repeating
with my correct column_metadata definition.  This seems to fix the problem (temporarily) until
it comes back.
> The last time it happened I had just restarted cassandra, so it could be that which is
causing the issue, I've got the production system ok at the moment, I will try restarting
a bit later when its not being used and if I can get the issue to reoccur I will add more
information.
> The problem first manifested itself in 1.1.2, so I upgraded to 1.1.6, this has not fixed
it.
> Here is an example of the create column family I'm using for one of the CFs that affected:
> create column family region
>   with column_type = 'Standard'
>   and comparator = 'UTF8Type'
>   and default_validation_class = 'BytesType'
>   and key_validation_class = 'UTF8Type'
>   and read_repair_chance = 0.1
>   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.SizeTieredCompactionStrategy'
>   and caching = 'KEYS_ONLY'
>   and column_metadata = [
>     
>     {column_name : 'label',
>     validation_class : UTF8Type},
>     
>     {column_name : 'countryCode',
>     validation_class : UTF8Type,
>     index_name : 'region_countryCode_idx',
>     index_type : 0},
>     
>     ]
>   and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
> I've noticed that CASSANDRA-4785 looks similar, in my case once the system has the problem,
it doesn't go away until I fix it.

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

Mime
View raw message