cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Jirsa (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-12014) IndexSummary > 2G causes an assertion error
Date Tue, 12 Sep 2017 20:59:00 GMT

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

Jeff Jirsa edited comment on CASSANDRA-12014 at 9/12/17 8:58 PM:
-----------------------------------------------------------------

FWIW, I think this unit test breaks circleCI, where the free plan runs tests on 4GB containers,
and the new tests aren't ok with that. I realize there are "other" options besides circleCI,
but it's the only free place where non-committers can easily run tests. 

Maybe we can alter it such that it skips the test if there's not enough RAM to run it?

Perhaps something like:

{code}
diff --git a/test/unit/org/apache/cassandra/io/sstable/IndexSummaryTest.java b/test/unit/org/apache/cassandra/io/sstable/IndexSummaryTest.java
index acac719..662d36a 100644
--- a/test/unit/org/apache/cassandra/io/sstable/IndexSummaryTest.java
+++ b/test/unit/org/apache/cassandra/io/sstable/IndexSummaryTest.java
@@ -26,6 +26,7 @@ import java.util.*;
 import com.google.common.collect.Lists;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.Assume;

 import org.apache.cassandra.Util;
 import org.apache.cassandra.config.DatabaseDescriptor;
@@ -70,6 +71,7 @@ public class IndexSummaryTest
     @Test
     public void testIndexSummaryKeySizes() throws IOException
     {
+        Assume.assumeTrue(Runtime.getRuntime().maxMemory() > Integer.MAX_VALUE);
         testIndexSummaryProperties(32, 100);
         testIndexSummaryProperties(64, 100);
         testIndexSummaryProperties(100, 100);
@@ -79,6 +81,7 @@ public class IndexSummaryTest

     private void testIndexSummaryProperties(int keySize, int numKeys) throws IOException
     {
+        Assume.assumeTrue(Runtime.getRuntime().maxMemory() > Integer.MAX_VALUE);
         final int minIndexInterval = 1;
         final List<DecoratedKey> keys = new ArrayList<>(numKeys);

@@ -114,6 +117,7 @@ public class IndexSummaryTest
     @Test
     public void tesLargeIndexSummary() throws IOException
     {
+        Assume.assumeTrue(Runtime.getRuntime().maxMemory() > Integer.MAX_VALUE);
         final int numKeys = 1000000;
         final int keySize = 3000;
         final int minIndexInterval = 1;
@@ -143,8 +147,9 @@ public class IndexSummaryTest
      * the index summary should be downsampled automatically.
      */
     @Test
-    public void tesLargeIndexSummaryWithExpectedSizeMatching() throws IOException
+    public void testLargeIndexSummaryWithExpectedSizeMatching() throws IOException
     {
+        Assume.assumeTrue(Runtime.getRuntime().maxMemory() > Integer.MAX_VALUE);
         final int numKeys = 1000000;
         final int keySize = 3000;
         final int minIndexInterval = 1;
{code}



was (Author: jjirsa):
FWIW, I think this unit test breaks circleCI, where the free plan runs tests on 4GB containers,
and the new tests aren't ok with that. I realize there are "other" options besides circleCI,
but it's the only free place where non-committers can easily run tests. 

Maybe we can alter it such that it skips the test if there's not enough RAM to run it?


> IndexSummary > 2G causes an assertion error
> -------------------------------------------
>
>                 Key: CASSANDRA-12014
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12014
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>            Assignee: Stefania
>            Priority: Minor
>             Fix For: 3.0.15, 3.11.1, 4.0
>
>
> {noformat}
> ERROR [CompactionExecutor:1546280] 2016-06-01 13:21:00,444  CassandraDaemon.java:229
- Exception in thread Thread[CompactionExecutor:1546280,1,main]
> java.lang.AssertionError: null
>     at org.apache.cassandra.io.sstable.IndexSummaryBuilder.maybeAddEntry(IndexSummaryBuilder.java:171)
~[cassandra-all-2.1.12.1046.jar:2.1.12.1046]
>     at org.apache.cassandra.io.sstable.SSTableWriter$IndexWriter.append(SSTableWriter.java:634)
~[cassandra-all-2.1.12.1046.jar:2.1.12.1046]
>     at org.apache.cassandra.io.sstable.SSTableWriter.afterAppend(SSTableWriter.java:179)
~[cassandra-all-2.1.12.1046.jar:2.1.12.1046]
>     at org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:205) ~[cassandra-all-2.1.12.1046.jar:2.1.12.1046]
>     at org.apache.cassandra.io.sstable.SSTableRewriter.append(SSTableRewriter.java:126)
~[cassandra-all-2.1.12.1046.jar:2.1.12.1046]
>     at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:197)
~[cassandra-all-2.1.12.1046.jar:2.1.12.1046]
>     at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[cassandra-all-2.1.12.1046.jar:2.1.12.1046]
>     at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:73)
~[cassandra-all-2.1.12.1046.jar:2.1.12.1046]
>     at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
~[cassandra-all-2.1.12.1046.jar:2.1.12.1046]
>     at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionCandidate.run(CompactionManager.java:263)
~[cassandra-all-2.1.12.1046.jar:2.1.12.1046]
>     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_51]
>     at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_51]
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
~[na:1.7.0_51]
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_51]
>     at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51]
> {noformat}
> I believe this can be fixed by raising the min_index_interval, but we should have a better
method of coping with this than throwing the AE.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message