cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-10778) CompactionExecutor writing to old index files
Date Fri, 27 Nov 2015 13:45:11 GMT

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

Sylvain Lebresne commented on CASSANDRA-10778:
----------------------------------------------

The reason is that the method to serialize old format index entries is not implemented (hence
the assertion), which was mistakenly though ok as we never write old format sstables, but
as the stack shows, we still potentially dump the key cache for old format sstables and that
requires this serialization method after all.

We just need to add the code to do it, which shouldn't be too hard, but I think we also need
to add a unit test to test serialization/deserialization for all format version we read.

Now, for those affected, the error isn't catastrophic. It means the key cache hasn't be saved
properly and that means you'll have a cold key cache on startup. I'll also note that running
{{upgradesstables}} will remove that problem by the virtue of converting all sstables to the
new format right away. In fact, I'd definitively recommend running {{upgradesstables}} when
upgrading nodes on 3.0 if at all practical.

> CompactionExecutor writing to old index files
> ---------------------------------------------
>
>                 Key: CASSANDRA-10778
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10778
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Compaction
>         Environment: Windows 7 64-bit, Cassandra 3.0.0, Java 1.8u60
>            Reporter: Will Zhang
>              Labels: error
>             Fix For: 3.0.1, 3.1
>
>
> Hi,
> I have been running some test for upgrading from v2.2.2 to v3.0.0. 
> I encountered the following `ERROR` in the `system.log` when I was *creating/dropping
materialized views*. I did some searches online but couldn't find anything useful so filing
this. The log seem to suggest that it is bug-like.
> Any thoughts on this would be appreciated.
> Main error line in log:
> {code}
> ERROR [CompactionExecutor:4] 2015-11-26 15:40:56,033 CassandraDaemon.java:195 - Exception
in thread Thread[CompactionExecutor:4,1,main]
>     java.lang.AssertionError: We read old index files but we should never write them
> {code}
> Longer log:
> {code}
>     INFO  [SharedPool-Worker-2] 2015-11-26 15:25:37,152 MigrationManager.java:336 - Create
new view: org.apache.cassandra.config.ViewDefinition@1b7fc5e6[ksName=demo,viewName=broker_quotes_by_date,baseTableId=bf928280-3c23-11e5-a4ba-07dc7eba8ee2,baseTableName=broker_quotes,includeAllColumns=true,whereClause=date
IS NOT NULL AND datetime IS NOT NULL AND isin IS NOT NULL AND side IS NOT NULL AND broker
IS NOT NULL,metadata=org.apache.cassandra.config.CFMetaData@49123522[cfId=f19cb8f0-9451-11e5-af90-6916ca23ea25,ksName=demo,cfName=broker_quotes_by_date,flags=[COMPOUND],params=TableParams{comment=,
read_repair_chance=0.0, dclocal_read_repair_chance=0.1, bloom_filter_fp_chance=0.01, crc_check_chance=1.0,
gc_grace_seconds=864000, default_time_to_live=0, memtable_flush_period_in_ms=0, min_index_interval=128,
max_index_interval=2048, speculative_retry=99PERCENTILE, caching={'keys' : 'ALL', 'rows_per_partition'
: 'NONE'}, compaction=CompactionParams{class=org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,
options={min_threshold=4, max_threshold=32}}, compression=org.apache.cassandra.schema.CompressionParams@f3ef4959,
extensions={}},comparator=comparator(org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimestampType),
org.apache.cassandra.db.marshal.UTF8Type, org.apache.cassandra.db.marshal.UTF8Type, org.apache.cassandra.db.marshal.UTF8Type),partitionColumns=[[]
| [bmark_spread g_spread is_axed oas_spread price size ytw z_spread]],partitionKeyColumns=[ColumnDefinition{name=date,
type=org.apache.cassandra.db.marshal.TimestampType, kind=PARTITION_KEY, position=0}],clusteringColumns=[ColumnDefinition{name=datetime,
type=org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimestampType),
kind=CLUSTERING, position=0}, ColumnDefinition{name=side, type=org.apache.cassandra.db.marshal.UTF8Type,
kind=CLUSTERING, position=1}, ColumnDefinition{name=isin, type=org.apache.cassandra.db.marshal.UTF8Type,
kind=CLUSTERING, position=2}, ColumnDefinition{name=broker, type=org.apache.cassandra.db.marshal.UTF8Type,
kind=CLUSTERING, position=3}],keyValidator=org.apache.cassandra.db.marshal.TimestampType,columnMetadata=[ColumnDefinition{name=z_spread,
type=org.apache.cassandra.db.marshal.FloatType, kind=REGULAR, position=-1}, ColumnDefinition{name=datetime,
type=org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimestampType),
kind=CLUSTERING, position=0}, ColumnDefinition{name=date, type=org.apache.cassandra.db.marshal.TimestampType,
kind=PARTITION_KEY, position=0}, ColumnDefinition{name=oas_spread, type=org.apache.cassandra.db.marshal.FloatType,
kind=REGULAR, position=-1}, ColumnDefinition{name=isin, type=org.apache.cassandra.db.marshal.UTF8Type,
kind=CLUSTERING, position=2}, ColumnDefinition{name=bmark_spread, type=org.apache.cassandra.db.marshal.FloatType,
kind=REGULAR, position=-1}, ColumnDefinition{name=side, type=org.apache.cassandra.db.marshal.UTF8Type,
kind=CLUSTERING, position=1}, ColumnDefinition{name=broker, type=org.apache.cassandra.db.marshal.UTF8Type,
kind=CLUSTERING, position=3}, ColumnDefinition{name=is_axed, type=org.apache.cassandra.db.marshal.BooleanType,
kind=REGULAR, position=-1}, ColumnDefinition{name=ytw, type=org.apache.cassandra.db.marshal.FloatType,
kind=REGULAR, position=-1}, ColumnDefinition{name=price, type=org.apache.cassandra.db.marshal.FloatType,
kind=REGULAR, position=-1}, ColumnDefinition{name=g_spread, type=org.apache.cassandra.db.marshal.FloatType,
kind=REGULAR, position=-1}, ColumnDefinition{name=size, type=org.apache.cassandra.db.marshal.DoubleType,
kind=REGULAR, position=-1}],droppedColumns={},triggers=[],indexes=[]]]
>     INFO  [MigrationStage:1] 2015-11-26 15:25:37,440 ColumnFamilyStore.java:381 - Initializing
demo.broker_quotes_by_date
>     ERROR [CompactionExecutor:4] 2015-11-26 15:40:56,033 CassandraDaemon.java:195 - Exception
in thread Thread[CompactionExecutor:4,1,main]
>     java.lang.AssertionError: We read old index files but we should never write them
> 	    at org.apache.cassandra.db.RowIndexEntry$Serializer.serialize(RowIndexEntry.java:130)
~[apache-cassandra-3.0.0.jar:3.0.0]
> 	    at org.apache.cassandra.service.CacheService$KeyCacheSerializer.serialize(CacheService.java:466)
~[apache-cassandra-3.0.0.jar:3.0.0]
> 	    at org.apache.cassandra.service.CacheService$KeyCacheSerializer.serialize(CacheService.java:454)
~[apache-cassandra-3.0.0.jar:3.0.0]
> 	    at org.apache.cassandra.cache.AutoSavingCache$Writer.saveCache(AutoSavingCache.java:358)
~[apache-cassandra-3.0.0.jar:3.0.0]
> 	    at org.apache.cassandra.db.compaction.CompactionManager$12.run(CompactionManager.java:1302)
~[apache-cassandra-3.0.0.jar:3.0.0]
> 	    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_60]
> 	    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_60]
> 	    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
~[na:1.8.0_60]
> 	    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[na:1.8.0_60]
> 	    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
> 	INFO  [IndexSummaryManager:1] 2015-11-26 15:41:10,729 IndexSummaryManager.java:257 -
Redistributing index summaries
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message