[jira] [Commented] (CASSANDRA-12832) SASI index corruption on too many overflow items
[ https://issues.apache.org/jira/browse/CASSANDRA-12832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15648569#comment-15648569 ] Pavel Yaskevich commented on CASSANDRA-12832: - [~ifesdjeen] I don't think it's a good idea to log instead of throwing an exception in there, because throwing exception gives a clear indication that file is unusable where logging it would still make it look "ok" and loadable altough data is going to be missing... > SASI index corruption on too many overflow items > > > Key: CASSANDRA-12832 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12832 > Project: Cassandra > Issue Type: Bug > Components: sasi >Reporter: Alex Petrov >Assignee: Alex Petrov > > When SASI index has too many overflow items, it currently writes a corrupted > index file: > {code} > java.lang.AssertionError: cannot have more than 8 overflow collisions per > leaf, but had: 15 > at > org.apache.cassandra.index.sasi.disk.AbstractTokenTreeBuilder$Leaf.createOverflowEntry(AbstractTokenTreeBuilder.java:357) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.AbstractTokenTreeBuilder$Leaf.createEntry(AbstractTokenTreeBuilder.java:346) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.DynamicTokenTreeBuilder$DynamicLeaf.serializeData(DynamicTokenTreeBuilder.java:180) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.AbstractTokenTreeBuilder$Leaf.serialize(AbstractTokenTreeBuilder.java:306) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.AbstractTokenTreeBuilder.write(AbstractTokenTreeBuilder.java:90) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder$MutableDataBlock.flushAndClear(OnDiskIndexBuilder.java:629) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder$MutableLevel.flush(OnDiskIndexBuilder.java:446) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder$MutableLevel.finalFlush(OnDiskIndexBuilder.java:451) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder.finish(OnDiskIndexBuilder.java:296) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder.finish(OnDiskIndexBuilder.java:258) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder.finish(OnDiskIndexBuilder.java:241) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.PerSSTableIndexWriter$Index.lambda$scheduleSegmentFlush$0(PerSSTableIndexWriter.java:267) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.PerSSTableIndexWriter$Index.lambda$complete$1(PerSSTableIndexWriter.java:296) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > ~[na:1.8.0_91] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > ~[na:1.8.0_91] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > [na:1.8.0_91] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > ERROR [MemtableFlushWriter:4] 2016-10-23 23:17:19,920 DataTracker.java:168 - > Can't open index file at , skipping. > java.lang.IllegalArgumentException: position: -524200, limit: 12288 > at > org.apache.cassandra.index.sasi.utils.MappedBuffer.position(MappedBuffer.java:106) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndex.(OnDiskIndex.java:155) > ~[main/:na] > at > org.apache.cassandra.index.sasi.SSTableIndex.(SSTableIndex.java:62) > ~[main/:na] > at > org.apache.cassandra.index.sasi.conf.DataTracker.getIndexes(DataTracker.java:150) > [main/:na] > at > org.apache.cassandra.index.sasi.conf.DataTracker.update(DataTracker.java:69) > [main/:na] > at > org.apache.cassandra.index.sasi.conf.ColumnIndex.update(ColumnIndex.java:147) > [main/:na] > at > org.apache.cassandra.index.sasi.SASIIndex.handleNotification(SASIIndex.java:320) > [main/:na] > at > org.apache.cassandra.db.lifecycle.Tracker.notifyAdded(Tracker.java:421) > [main/:na] > at > org.apache.cassandra.db.lifecycle.Tracker.replaceFlushed(Tracker.java:356) > [main/:na] > at > org.apache.cassandra.db.compaction.CompactionStrategyManager.replaceFlushed(CompactionStrategyManager.java:317) > [main/:na] > at > org.apache.cassandra.db.ColumnFamilyStore.replaceFlushed(ColumnFamilyStore.java:1569) > [main/:na] > at > org.apache.cassandra.db.ColumnFamilyStore$Flush.flushMemtable(ColumnFamilyStore.java:1197) > [main/:na] > at > org.apache.cassandr
[jira] [Commented] (CASSANDRA-12832) SASI index corruption on too many overflow items
[ https://issues.apache.org/jira/browse/CASSANDRA-12832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15648636#comment-15648636 ] Alex Petrov commented on CASSANDRA-12832: - True. Although that wouldn't even be a problem if not the issue described in [CASSANDRA-12877]... > SASI index corruption on too many overflow items > > > Key: CASSANDRA-12832 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12832 > Project: Cassandra > Issue Type: Bug > Components: sasi >Reporter: Alex Petrov >Assignee: Alex Petrov > > When SASI index has too many overflow items, it currently writes a corrupted > index file: > {code} > java.lang.AssertionError: cannot have more than 8 overflow collisions per > leaf, but had: 15 > at > org.apache.cassandra.index.sasi.disk.AbstractTokenTreeBuilder$Leaf.createOverflowEntry(AbstractTokenTreeBuilder.java:357) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.AbstractTokenTreeBuilder$Leaf.createEntry(AbstractTokenTreeBuilder.java:346) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.DynamicTokenTreeBuilder$DynamicLeaf.serializeData(DynamicTokenTreeBuilder.java:180) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.AbstractTokenTreeBuilder$Leaf.serialize(AbstractTokenTreeBuilder.java:306) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.AbstractTokenTreeBuilder.write(AbstractTokenTreeBuilder.java:90) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder$MutableDataBlock.flushAndClear(OnDiskIndexBuilder.java:629) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder$MutableLevel.flush(OnDiskIndexBuilder.java:446) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder$MutableLevel.finalFlush(OnDiskIndexBuilder.java:451) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder.finish(OnDiskIndexBuilder.java:296) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder.finish(OnDiskIndexBuilder.java:258) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndexBuilder.finish(OnDiskIndexBuilder.java:241) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.PerSSTableIndexWriter$Index.lambda$scheduleSegmentFlush$0(PerSSTableIndexWriter.java:267) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.PerSSTableIndexWriter$Index.lambda$complete$1(PerSSTableIndexWriter.java:296) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > ~[na:1.8.0_91] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > ~[na:1.8.0_91] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > [na:1.8.0_91] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > ERROR [MemtableFlushWriter:4] 2016-10-23 23:17:19,920 DataTracker.java:168 - > Can't open index file at , skipping. > java.lang.IllegalArgumentException: position: -524200, limit: 12288 > at > org.apache.cassandra.index.sasi.utils.MappedBuffer.position(MappedBuffer.java:106) > ~[main/:na] > at > org.apache.cassandra.index.sasi.disk.OnDiskIndex.(OnDiskIndex.java:155) > ~[main/:na] > at > org.apache.cassandra.index.sasi.SSTableIndex.(SSTableIndex.java:62) > ~[main/:na] > at > org.apache.cassandra.index.sasi.conf.DataTracker.getIndexes(DataTracker.java:150) > [main/:na] > at > org.apache.cassandra.index.sasi.conf.DataTracker.update(DataTracker.java:69) > [main/:na] > at > org.apache.cassandra.index.sasi.conf.ColumnIndex.update(ColumnIndex.java:147) > [main/:na] > at > org.apache.cassandra.index.sasi.SASIIndex.handleNotification(SASIIndex.java:320) > [main/:na] > at > org.apache.cassandra.db.lifecycle.Tracker.notifyAdded(Tracker.java:421) > [main/:na] > at > org.apache.cassandra.db.lifecycle.Tracker.replaceFlushed(Tracker.java:356) > [main/:na] > at > org.apache.cassandra.db.compaction.CompactionStrategyManager.replaceFlushed(CompactionStrategyManager.java:317) > [main/:na] > at > org.apache.cassandra.db.ColumnFamilyStore.replaceFlushed(ColumnFamilyStore.java:1569) > [main/:na] > at > org.apache.cassandra.db.ColumnFamilyStore$Flush.flushMemtable(ColumnFamilyStore.java:1197) > [main/:na] > at > org.apache.cassandra.db.ColumnFamilyStore$Flush.run(ColumnFamilyStore.java:1100) > [main/:na] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > [na: