[ 
https://issues.apache.org/jira/browse/CASSANDRA-14315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paulo Motta resolved CASSANDRA-14315.
-------------------------------------
    Resolution: Fixed

Good catch! Patch and tests LGTM. Committed as 
{{5b9e985474e696a83d23e7cf4bedaf360cdb1eaf}} to trunk. Thanks!

> ThrottledUnfilteredIterator failed on UnfilteredRowIterator with only 
> partition level info
> ------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-14315
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14315
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Materialized Views
>            Reporter: ZhaoYang
>            Assignee: ZhaoYang
>            Priority: Major
>             Fix For: 4.0
>
>         Attachments: dtest.png, unit test.png
>
>
> When repairing base table with MV, in order to avoid OOM, Cassandra-13299 
> added ThrottledUnfilteredIterator to split large partition into small chunks, 
> but it didn't handle partition without unfiltered properly.
> {code:title=repro}
> // create cell tombstone, range tombstone, partition deletion
> createTable("CREATE TABLE %s (pk int, ck1 int, ck2 int, v1 int, v2 int, 
> PRIMARY KEY (pk, ck1, ck2))");
> // partition deletion
> execute("DELETE FROM %s USING TIMESTAMP 160 WHERE pk=1");
> // flush and generate 1 sstable
> ColumnFamilyStore cfs = 
> Keyspace.open(keyspace()).getColumnFamilyStore(currentTable());
> cfs.forceBlockingFlush();
> cfs.disableAutoCompaction();
> cfs.forceMajorCompaction();
> assertEquals(1, cfs.getLiveSSTables().size());
> SSTableReader reader = cfs.getLiveSSTables().iterator().next();
> try (ISSTableScanner scanner = reader.getScanner();
>         CloseableIterator<UnfilteredRowIterator> throttled = 
> ThrottledUnfilteredIterator.throttle(scanner, 100))
> {
>     assertTrue(throttled.hasNext());
>     UnfilteredRowIterator iterator = throttled.next();
>     assertFalse(throttled.hasNext());
>     assertFalse(iterator.hasNext());
>     assertEquals(iterator.partitionLevelDeletion().markedForDeleteAt(), 160);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to