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

ASF GitHub Bot commented on CASSANDRA-12796:
--------------------------------------------

GitHub user mmajercik opened a pull request:

    https://github.com/apache/cassandra/pull/82

    12796 2.2

    This is a proposed fix for CASSANDRA-12796

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mmajercik/cassandra 12796-2.2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cassandra/pull/82.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #82
    
----
commit caaa9fc82cd51b7321da4dad0715ebc561d180dd
Author: Josh McKenzie <[email protected]>
Date:   2016-04-01T15:46:15Z

    Merge branch 'cassandra-2.1' into cassandra-2.2

commit c662259fe9e1e25e10e58eb1146de80c53e69867
Author: Yuki Morishita <[email protected]>
Date:   2016-02-16T18:45:36Z

    Use canonical path for directory in SSTable descriptor
    
    patch by yukim; reviewed by Paulo Motta for CASSANDRA-10587

commit 0ac2072bb2cc6d8e069e07f5cbcdf2e83cdc5b5c
Author: Andrzej Ludwikowski <[email protected]>
Date:   2016-03-07T18:27:54Z

    DatabaseDescriptor should log stacktrace in case of Eception during seed 
provider creation
    
    patch by Andrzej Ludwikowski; reviewed by jasobrown for CASSANDRA-11312

commit ea9b42e7d7bf9003dd6ed911035d3a85a2d99bac
Author: Benjamin Lerer <[email protected]>
Date:   2016-04-02T15:55:04Z

    Fix paging for COMPACT tables without clustering columns
    
    patch by Benjamin Lerer; reviewed by Tyler Hobbs for CASSANDRA-11467

commit 2ed855592ab77399e061f03f73a943aefbd44eaf
Author: Benjamin Lerer <[email protected]>
Date:   2016-04-02T15:59:37Z

    Merge branch cassandra-2.1 into cassandra-2.2

commit 1ff9df75c46edb02bf1f994e7ecc651e29b277fb
Author: Marcus Olsson <[email protected]>
Date:   2016-03-24T14:06:23Z

    Remove duplicate logging of sending MerkleTree request
    
    Patch by Marcus Olsson; reviewed by marcuse for CASSANDRA-11486

commit a33038be23e4114f5b6f0736887d35656b0aa40f
Author: Ryan Magnusson <[email protected]>
Date:   2016-04-04T12:09:54Z

    IncomingStreamingConnection version check message wrong
    
    patch by Ryan Magnusson reviewed by Robert Stupp for CASSANDRA-11462

commit 96c53e0a5e73046acb77e2ac2a3aa9d9ef64fc65
Author: Josh McKenzie <[email protected]>
Date:   2016-04-06T22:37:08Z

    Fix launch with whitespace in path on Windows
    
    Patch by jmckenzie; reviewed by pmotta for CASSANDRA-11515

commit 2dd244b439049baa1a9f175237acf802e1946d74
Author: Benjamin Lerer <[email protected]>
Date:   2016-04-11T07:41:44Z

    Ninja: fix typo in CommitLog error message

commit e22faeb8c5463a34b630aff8e265aefbe950b58d
Author: Benjamin Lerer <[email protected]>
Date:   2016-04-11T07:43:56Z

    Merge branch cassandra-2.1 into cassandra-2.2

commit 3557d2e05c8d1059562de2a91c1b33b4fcfcc6eb
Author: Paulo Motta <[email protected]>
Date:   2016-04-05T19:58:06Z

    Make deprecated repair methods backward-compatible with previous 
notification service
    
    patch by Paulo Motta; reviewed by Yuki Morishita for CASSANDRA-11430

commit c1b1d3bccf30a7ee1deb633d2bc2dfbd7b9c542f
Author: Stefania Alborghetti <[email protected]>
Date:   2016-04-08T03:52:17Z

    Checking if an unlogged batch is local is inefficient
    
    patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-11529

commit ab2b8a60c4b6d27081d632fefa0e19ee13816e2c
Author: Aleksey Yeschenko <[email protected]>
Date:   2016-04-11T18:14:41Z

    Merge branch 'cassandra-2.1' into cassandra-2.2

commit 19b4b637ac79b5d53b9384bd95bed8e08b43f111
Author: Jacek Lewandowski <[email protected]>
Date:   2016-04-08T15:31:00Z

    CqlConfigHelper no longer requires both a keystore and truststore to work.
    
    patch by Jacek Lewandowski; reviewed by Jeremiah Jordan for CASSANDRA-11532

commit 69edeaa46b78bb168f7e9d0b1c991c07b90f41ca
Author: Alex Petrov <[email protected]>
Date:   2016-04-14T10:26:52Z

    Allow only DISTINCT queries with partition keys restrictions
    
    patch by Alex Petrov; reviewed by Benjamin Lerer for CASSANDRA-11339

commit 220e4f62db7fe14c4d6c0e499c52059f7ebc5a53
Author: T Jake Luciani <[email protected]>
Date:   2016-04-15T14:00:04Z

    2.2.6 version bump

commit 5c5c5b44c6d952d4d6f8170fa4ef239060275b76
Author: T Jake Luciani <[email protected]>
Date:   2016-04-15T14:30:21Z

    2.1.14 version bump

commit 37f63ecc5d3b36fc115fd7ae98e4fc1f4bc2d1d6
Author: T Jake Luciani <[email protected]>
Date:   2016-04-15T14:34:48Z

    Merge branch 'cassandra-2.1' into cassandra-2.2

commit 77ab77328e7e263a8e93ff24ff9b5d4be33e7c27
Author: Artem Aliev <[email protected]>
Date:   2016-04-18T14:24:12Z

    Always close cluster with connection in CqlRecordWriter
    
    patch by Artem Aliev; reviewed by Aleksey Yeschenko for CASSANDRA-11553

commit d200d137823d5b250406bccb35473a8fc2f14faf
Author: Ruoran Wang <[email protected]>
Date:   2016-04-18T22:49:30Z

    Replace sstables on DataTracker before marking them as non-compacting 
during anti-compaction
    
    Patch by Ruoran Wang; reviewed by Paulo Motta for CASSANDRA-11548

commit 209ebd380b641c4f065e9687186f546f8a50b242
Author: Paulo Motta <[email protected]>
Date:   2016-04-18T21:44:07Z

    Add unit test for CASSANDRA-11548
    
    Patch by Paulo Motta; reviewed by Marcus Eriksson for CASSANDRA-11548

commit 97a43ffff2610f5f57678c69ca674b7d795c36b4
Author: Marcus Eriksson <[email protected]>
Date:   2016-04-19T13:48:52Z

    Merge branch 'cassandra-2.1' into cassandra-2.2

commit 60997c2dedc23a80dcc15fe6b1e2e7769ad2d383
Author: Benjamin Lerer <[email protected]>
Date:   2016-04-19T15:46:21Z

    Fix javadoc in AggregateFcts

commit 4389c9cfd86fb3f31a9419c44f0521604be3637b
Author: Stefania Alborghetti <[email protected]>
Date:   2016-04-11T02:31:34Z

    cqlsh: Fix potential COPY deadlock
    
    This deadlock could occur when the parent process is terminating child
    processes (partial backport of CASSANDRA-11320).
    
    Patch by Stefania Alborghetti; reviewed by Tyler Hobbs for
    CASSANDRA-11505

commit e865e396cdd6281f7eaac9cde8b5528547cb8e98
Author: Tyler Hobbs <[email protected]>
Date:   2016-04-20T18:55:28Z

    Merge branch 'cassandra-2.1' into cassandra-2.2

commit eb072a0fa05292dd347e96d3bc45b445995227ec
Author: Stefania Alborghetti <[email protected]>
Date:   2016-04-06T09:14:11Z

    cqlsh: COPY FROM should use regular inserts for single statement batches
    and report errors correctly if workers processes crash on initialization
    
    patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-11474

commit c8914c0725f190df6e522179157850ebc855fdcb
Author: Stefania Alborghetti <[email protected]>
Date:   2016-04-12T02:12:18Z

    cqlsh: COPY FROM ignores NULL values in conversion
    
    patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-11549

commit b80ff541e25d4123f772dd82f00094e7c3837698
Author: Stefania Alborghetti <[email protected]>
Date:   2016-04-21T02:12:24Z

    Merge branch 'cassandra-2.1' into cassandra-2.2

commit 3244774572c56400ed96da4d57912779878c16e5
Author: Alex Petrov <[email protected]>
Date:   2016-04-21T09:46:09Z

    Avoid possible stack overflow in ModificationStatement::getFunctions
    
    Patch by Alex Petrov; reviewed by Sam Tunnicliffe for CASSANDRA-11621

commit c42f5f68532a9e42e3f228b9dba5fdc9de5c37ca
Author: Tyler Hobbs <[email protected]>
Date:   2016-04-21T20:31:40Z

    Ninja: use logger.trace() when we only intend to log at trace

----


> Heap exhaustion when rebuilding secondary index over a table with wide 
> partitions
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-12796
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12796
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Milan Majercik
>            Priority: Critical
>
> We have a table with rather wide partition and a secondary index defined over 
> it. As soon as we try to rebuild the index we observed exhaustion of Java 
> heap and eventual OOM error. After a lengthy investigation we have managed to 
> find a culprit which appears to be a wrong granule of barrier issuances in 
> method {{org.apache.cassandra.db.Keyspace.indexRow}}:
> {code}
>         try (OpOrder.Group opGroup = cfs.keyspace.writeOrder.start()){html}
>         {
>             Set<SecondaryIndex> indexes = 
> cfs.indexManager.getIndexesByNames(idxNames);
>             Iterator<ColumnFamily> pager = QueryPagers.pageRowLocally(cfs, 
> key.getKey(), DEFAULT_PAGE_SIZE);
>             while (pager.hasNext())
>             {
>                 ColumnFamily cf = pager.next();
>                 ColumnFamily cf2 = cf.cloneMeShallow();
>                 for (Cell cell : cf)
>                 {
>                     if (cfs.indexManager.indexes(cell.name(), indexes))
>                         cf2.addColumn(cell);
>                 }
>                 cfs.indexManager.indexRow(key.getKey(), cf2, opGroup);
>             }
>         }
> {code}
> Please note the operation group granule is a partition of the source table 
> which poses a problem for wide partition tables as flush runnable 
> ({{org.apache.cassandra.db.ColumnFamilyStore.Flush.run()}}) won't proceed 
> with flushing secondary index memtable before completing operations prior 
> recent issue of the barrier. In our situation the flush runnable waits until 
> whole wide partition gets indexed into the secondary index memtable before 
> flushing it. This causes an exhaustion of the heap and eventual OOM error.
> After we changed granule of barrier issue in method 
> {{org.apache.cassandra.db.Keyspace.indexRow}} to query page as opposed to 
> table partition secondary index (see 
> [https://github.com/mmajercik/cassandra/commit/7e10e5aa97f1de483c2a5faf867315ecbf65f3d6?diff=unified]),
>  rebuild started to work without heap exhaustion. 



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

Reply via email to