[jira] [Commented] (CASSANDRA-12928) Assert error, 3.9 mutation stage
[ https://issues.apache.org/jira/browse/CASSANDRA-12928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15797468#comment-15797468 ] Romain GERARD commented on CASSANDRA-12928: --- Happy new year Bump :) > Assert error, 3.9 mutation stage > > > Key: CASSANDRA-12928 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12928 > Project: Cassandra > Issue Type: Bug > Environment: 3.9 >Reporter: Jeff Jirsa > Attachments: 0001-Bump-version-of-netty-all-to-4.1.6.patch > > > {code} > WARN [MutationStage-341] 2016-11-17 18:39:18,781 > AbstractLocalAwareExecutorService.java:169 - Uncaught exception on thread > Thread[MutationStage-341,5,main]: {} > java.lang.AssertionError: null > at > io.netty.util.Recycler$WeakOrderQueue.(Recycler.java:225) > ~[netty-all-4.0.39.Final.jar:4.0.39.Final] > at > io.netty.util.Recycler$DefaultHandle.recycle(Recycler.java:180) > ~[netty-all-4.0.39.Final.jar:4.0.39.Final] > at io.netty.util.Recycler.recycle(Recycler.java:141) > ~[netty-all-4.0.39.Final.jar:4.0.39.Final] > at > org.apache.cassandra.utils.btree.BTree$Builder.recycle(BTree.java:836) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.utils.btree.BTree$Builder.build(BTree.java:1089) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.db.partitions.PartitionUpdate.build(PartitionUpdate.java:587) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.db.partitions.PartitionUpdate.maybeBuild(PartitionUpdate.java:577) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.db.partitions.PartitionUpdate.holder(PartitionUpdate.java:388) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.db.partitions.AbstractBTreePartition.unfilteredIterator(AbstractBTreePartition.java:177) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.db.partitions.AbstractBTreePartition.unfilteredIterator(AbstractBTreePartition.java:172) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.db.partitions.PartitionUpdate$PartitionUpdateSerializer.serializedSize(PartitionUpdate.java:868) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.db.Mutation$MutationSerializer.serializedSize(Mutation.java:456) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.db.commitlog.CommitLog.add(CommitLog.java:257) > ~[apache-cassandra-3.9.jar:3.9] > at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:493) > ~[apache-cassandra-3.9.jar:3.9] > at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:396) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.db.Mutation.applyFuture(Mutation.java:215) > ~[apache-cassandra-3.9.jar:3.9] > at org.apache.cassandra.db.Mutation.apply(Mutation.java:227) > ~[apache-cassandra-3.9.jar:3.9] > at org.apache.cassandra.db.Mutation.apply(Mutation.java:241) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.service.StorageProxy$8.runMayThrow(StorageProxy.java:1347) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.service.StorageProxy$LocalMutationRunnable.run(StorageProxy.java:2539) > ~[apache-cassandra-3.9.jar:3.9] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:136) > [apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) > [apache-cassandra-3.9.jar:3.9] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12348) Flaky failures in SSTableRewriterTest.basicTest2/getPositionsTest
[ https://issues.apache.org/jira/browse/CASSANDRA-12348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefania updated CASSANDRA-12348: - Resolution: Fixed Fix Version/s: (was: 3.0.x) 3.0.11 Status: Resolved (was: Ready to Commit) > Flaky failures in SSTableRewriterTest.basicTest2/getPositionsTest > - > > Key: CASSANDRA-12348 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12348 > Project: Cassandra > Issue Type: Bug > Components: Testing >Reporter: Joel Knighton >Assignee: Stefania > Fix For: 3.0.11, 3.8 > > > Example failures: > http://cassci.datastax.com/job/cassandra-3.9_testall/45/testReport/junit/org.apache.cassandra.io.sstable/SSTableRewriterTest/basicTest2/ > http://cassci.datastax.com/job/cassandra-3.9_testall/37/testReport/junit/org.apache.cassandra.io.sstable/SSTableRewriterTest/getPositionsTest/ > http://cassci.datastax.com/job/trunk_testall/1054/testReport/junit/org.apache.cassandra.io.sstable/SSTableRewriterTest/getPositionsTest/ > All failures look like the test is finding more files than expected after a > rewrite. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12348) Flaky failures in SSTableRewriterTest.basicTest2/getPositionsTest
[ https://issues.apache.org/jira/browse/CASSANDRA-12348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15797394#comment-15797394 ] Stefania commented on CASSANDRA-12348: -- Committed to 3.0 as d2344683d3100168940230768c27206af2d75d95. > Flaky failures in SSTableRewriterTest.basicTest2/getPositionsTest > - > > Key: CASSANDRA-12348 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12348 > Project: Cassandra > Issue Type: Bug > Components: Testing >Reporter: Joel Knighton >Assignee: Stefania > Fix For: 3.8, 3.0.x > > > Example failures: > http://cassci.datastax.com/job/cassandra-3.9_testall/45/testReport/junit/org.apache.cassandra.io.sstable/SSTableRewriterTest/basicTest2/ > http://cassci.datastax.com/job/cassandra-3.9_testall/37/testReport/junit/org.apache.cassandra.io.sstable/SSTableRewriterTest/getPositionsTest/ > http://cassci.datastax.com/job/trunk_testall/1054/testReport/junit/org.apache.cassandra.io.sstable/SSTableRewriterTest/getPositionsTest/ > All failures look like the test is finding more files than expected after a > rewrite. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[02/10] cassandra git commit: Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348)
Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348) patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-12348 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d2344683 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d2344683 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d2344683 Branch: refs/heads/cassandra-3.11 Commit: d2344683d3100168940230768c27206af2d75d95 Parents: 37e124e Author: Stefania AlborghettiAuthored: Mon Aug 1 14:45:29 2016 +0800 Committer: Stefania Alborghetti Committed: Wed Jan 4 08:04:52 2017 +0100 -- CHANGES.txt | 1 + .../io/sstable/SSTableRewriterTest.java | 12 ++-- .../io/sstable/SSTableWriterTestBase.java | 20 3 files changed, 27 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 36c88c9..666a771 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.11 + * Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348) * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620) * Add parent repair session id to anticompaction log message (CASSANDRA-12186) * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java -- diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java b/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java index a7e822f..bdc3b42 100644 --- a/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java +++ b/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java @@ -99,9 +99,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); truncate(cfs); } @Test @@ -131,9 +131,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); } @Test @@ -186,9 +186,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); truncate(cfs); } http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java -- diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java b/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java index 5c7c7c0..26b1134 100644 --- a/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java +++ b/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java @@ -111,6 +111,25 @@ public class SSTableWriterTestBase extends SchemaLoader validateCFS(cfs); } +/** + * Validate the column family store by checking that all live + * sstables are referenced only once and are not marked as + * compacting. It also checks that the generation of the data + * files on disk is the same as that of the live sstables, + * to ensure that the data files on disk belong to the live + * sstables. Finally, it checks that the metrics contain the + * correct disk space used, live and total. + * + * Note that this method will submit a maximal compaction task + * if there are live sstables, in order to check that there is at least +
[06/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11
Merge branch 'cassandra-3.0' into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e043d7d0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e043d7d0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e043d7d0 Branch: refs/heads/cassandra-3.11 Commit: e043d7d0bfa5416a8e16646f8cafed91768f635e Parents: cac7364 d234468 Author: Stefania AlborghettiAuthored: Wed Jan 4 08:07:52 2017 +0100 Committer: Stefania Alborghetti Committed: Wed Jan 4 08:07:52 2017 +0100 -- --
[08/10] cassandra git commit: Merge branch 'cassandra-3.11' into cassandra-3.X
Merge branch 'cassandra-3.11' into cassandra-3.X Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/342e28f6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/342e28f6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/342e28f6 Branch: refs/heads/cassandra-3.X Commit: 342e28f695294a2afdde4fbe4faa42f8c0ebad76 Parents: 04ee4cc e043d7d Author: Stefania AlborghettiAuthored: Wed Jan 4 08:08:31 2017 +0100 Committer: Stefania Alborghetti Committed: Wed Jan 4 08:08:31 2017 +0100 -- --
[07/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11
Merge branch 'cassandra-3.0' into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e043d7d0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e043d7d0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e043d7d0 Branch: refs/heads/trunk Commit: e043d7d0bfa5416a8e16646f8cafed91768f635e Parents: cac7364 d234468 Author: Stefania AlborghettiAuthored: Wed Jan 4 08:07:52 2017 +0100 Committer: Stefania Alborghetti Committed: Wed Jan 4 08:07:52 2017 +0100 -- --
[05/10] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11
Merge branch 'cassandra-3.0' into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e043d7d0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e043d7d0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e043d7d0 Branch: refs/heads/cassandra-3.X Commit: e043d7d0bfa5416a8e16646f8cafed91768f635e Parents: cac7364 d234468 Author: Stefania AlborghettiAuthored: Wed Jan 4 08:07:52 2017 +0100 Committer: Stefania Alborghetti Committed: Wed Jan 4 08:07:52 2017 +0100 -- --
[03/10] cassandra git commit: Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348)
Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348) patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-12348 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d2344683 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d2344683 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d2344683 Branch: refs/heads/cassandra-3.X Commit: d2344683d3100168940230768c27206af2d75d95 Parents: 37e124e Author: Stefania AlborghettiAuthored: Mon Aug 1 14:45:29 2016 +0800 Committer: Stefania Alborghetti Committed: Wed Jan 4 08:04:52 2017 +0100 -- CHANGES.txt | 1 + .../io/sstable/SSTableRewriterTest.java | 12 ++-- .../io/sstable/SSTableWriterTestBase.java | 20 3 files changed, 27 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 36c88c9..666a771 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.11 + * Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348) * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620) * Add parent repair session id to anticompaction log message (CASSANDRA-12186) * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java -- diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java b/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java index a7e822f..bdc3b42 100644 --- a/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java +++ b/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java @@ -99,9 +99,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); truncate(cfs); } @Test @@ -131,9 +131,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); } @Test @@ -186,9 +186,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); truncate(cfs); } http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java -- diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java b/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java index 5c7c7c0..26b1134 100644 --- a/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java +++ b/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java @@ -111,6 +111,25 @@ public class SSTableWriterTestBase extends SchemaLoader validateCFS(cfs); } +/** + * Validate the column family store by checking that all live + * sstables are referenced only once and are not marked as + * compacting. It also checks that the generation of the data + * files on disk is the same as that of the live sstables, + * to ensure that the data files on disk belong to the live + * sstables. Finally, it checks that the metrics contain the + * correct disk space used, live and total. + * + * Note that this method will submit a maximal compaction task + * if there are live sstables, in order to check that there is at least + *
[04/10] cassandra git commit: Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348)
Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348) patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-12348 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d2344683 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d2344683 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d2344683 Branch: refs/heads/trunk Commit: d2344683d3100168940230768c27206af2d75d95 Parents: 37e124e Author: Stefania AlborghettiAuthored: Mon Aug 1 14:45:29 2016 +0800 Committer: Stefania Alborghetti Committed: Wed Jan 4 08:04:52 2017 +0100 -- CHANGES.txt | 1 + .../io/sstable/SSTableRewriterTest.java | 12 ++-- .../io/sstable/SSTableWriterTestBase.java | 20 3 files changed, 27 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 36c88c9..666a771 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.11 + * Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348) * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620) * Add parent repair session id to anticompaction log message (CASSANDRA-12186) * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java -- diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java b/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java index a7e822f..bdc3b42 100644 --- a/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java +++ b/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java @@ -99,9 +99,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); truncate(cfs); } @Test @@ -131,9 +131,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); } @Test @@ -186,9 +186,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); truncate(cfs); } http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java -- diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java b/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java index 5c7c7c0..26b1134 100644 --- a/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java +++ b/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java @@ -111,6 +111,25 @@ public class SSTableWriterTestBase extends SchemaLoader validateCFS(cfs); } +/** + * Validate the column family store by checking that all live + * sstables are referenced only once and are not marked as + * compacting. It also checks that the generation of the data + * files on disk is the same as that of the live sstables, + * to ensure that the data files on disk belong to the live + * sstables. Finally, it checks that the metrics contain the + * correct disk space used, live and total. + * + * Note that this method will submit a maximal compaction task + * if there are live sstables, in order to check that there is at least + * a
[10/10] cassandra git commit: Merge branch 'cassandra-3.X' into trunk
Merge branch 'cassandra-3.X' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d0e3ade8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d0e3ade8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d0e3ade8 Branch: refs/heads/trunk Commit: d0e3ade8e44a228e2800e89d0757c20a24f9955e Parents: a8a43dd 342e28f Author: Stefania AlborghettiAuthored: Wed Jan 4 08:08:45 2017 +0100 Committer: Stefania Alborghetti Committed: Wed Jan 4 08:08:45 2017 +0100 -- --
[09/10] cassandra git commit: Merge branch 'cassandra-3.11' into cassandra-3.X
Merge branch 'cassandra-3.11' into cassandra-3.X Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/342e28f6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/342e28f6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/342e28f6 Branch: refs/heads/trunk Commit: 342e28f695294a2afdde4fbe4faa42f8c0ebad76 Parents: 04ee4cc e043d7d Author: Stefania AlborghettiAuthored: Wed Jan 4 08:08:31 2017 +0100 Committer: Stefania Alborghetti Committed: Wed Jan 4 08:08:31 2017 +0100 -- --
[01/10] cassandra git commit: Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348)
Repository: cassandra Updated Branches: refs/heads/cassandra-3.0 37e124e81 -> d2344683d refs/heads/cassandra-3.11 cac7364e7 -> e043d7d0b refs/heads/cassandra-3.X 04ee4ccb9 -> 342e28f69 refs/heads/trunk a8a43dd32 -> d0e3ade8e Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348) patch by Stefania Alborghetti; reviewed by Paulo Motta for CASSANDRA-12348 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d2344683 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d2344683 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d2344683 Branch: refs/heads/cassandra-3.0 Commit: d2344683d3100168940230768c27206af2d75d95 Parents: 37e124e Author: Stefania AlborghettiAuthored: Mon Aug 1 14:45:29 2016 +0800 Committer: Stefania Alborghetti Committed: Wed Jan 4 08:04:52 2017 +0100 -- CHANGES.txt | 1 + .../io/sstable/SSTableRewriterTest.java | 12 ++-- .../io/sstable/SSTableWriterTestBase.java | 20 3 files changed, 27 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 36c88c9..666a771 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0.11 + * Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348) * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620) * Add parent repair session id to anticompaction log message (CASSANDRA-12186) * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java -- diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java b/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java index a7e822f..bdc3b42 100644 --- a/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java +++ b/test/unit/org/apache/cassandra/io/sstable/SSTableRewriterTest.java @@ -99,9 +99,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); truncate(cfs); } @Test @@ -131,9 +131,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); } @Test @@ -186,9 +186,9 @@ public class SSTableRewriterTest extends SSTableWriterTestBase writer.finish(); } LifecycleTransaction.waitForDeletions(); +assertEquals(1, assertFileCounts(sstables.iterator().next().descriptor.directory.list())); + validateCFS(cfs); -int filecounts = assertFileCounts(sstables.iterator().next().descriptor.directory.list()); -assertEquals(1, filecounts); truncate(cfs); } http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2344683/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java -- diff --git a/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java b/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java index 5c7c7c0..26b1134 100644 --- a/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java +++ b/test/unit/org/apache/cassandra/io/sstable/SSTableWriterTestBase.java @@ -111,6 +111,25 @@ public class SSTableWriterTestBase extends SchemaLoader validateCFS(cfs); } +/** + * Validate the column family store by checking that all live + * sstables are referenced only once and are not marked as + * compacting. It also checks that the generation of the data + * files on disk is the same as that of the live sstables, + * to ensure that the data files on disk belong to the live + * sstables. Finally, it checks
[jira] [Created] (CASSANDRA-13094) typo in the architecture docs - gaurantees
Richlv created CASSANDRA-13094: -- Summary: typo in the architecture docs - gaurantees Key: CASSANDRA-13094 URL: https://issues.apache.org/jira/browse/CASSANDRA-13094 Project: Cassandra Issue Type: Bug Components: Documentation and Website Reporter: Richlv Priority: Trivial see http://cassandra.apache.org/doc/latest/architecture/dynamo.html - "this also gaurantees" -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13038) 33% of compaction time spent in StreamingHistogram.update()
[ https://issues.apache.org/jira/browse/CASSANDRA-13038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15797119#comment-15797119 ] Jeff Jirsa commented on CASSANDRA-13038: Rounding up to the next hour may be suitable for special cases (including your use case), and you may be willing to tolerate that until the streaming histogram is more efficient, but is not reasonable for the general population. > 33% of compaction time spent in StreamingHistogram.update() > --- > > Key: CASSANDRA-13038 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13038 > Project: Cassandra > Issue Type: Bug > Components: Compaction >Reporter: Corentin Chary >Assignee: Corentin Chary > Attachments: compaction-speedup.patch, > compaction-streaminghistrogram.png, profiler-snapshot.nps > > > With the following table, that contains a *lot* of cells: > {code} > CREATE TABLE biggraphite.datapoints_11520p_60s ( > metric uuid, > time_start_ms bigint, > offset smallint, > count int, > value double, > PRIMARY KEY ((metric, time_start_ms), offset) > ) WITH CLUSTERING ORDER BY (offset DESC); > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', > 'compaction_window_size': '6', 'compaction_window_unit': 'HOURS', > 'max_threshold': '32', 'min_threshold': '6'} > Keyspace : biggraphite > Read Count: 1822 > Read Latency: 1.8870054884742042 ms. > Write Count: 2212271647 > Write Latency: 0.027705127678653473 ms. > Pending Flushes: 0 > Table: datapoints_11520p_60s > SSTable count: 47 > Space used (live): 300417555945 > Space used (total): 303147395017 > Space used by snapshots (total): 0 > Off heap memory used (total): 207453042 > SSTable Compression Ratio: 0.4955200053039823 > Number of keys (estimate): 16343723 > Memtable cell count: 220576 > Memtable data size: 17115128 > Memtable off heap memory used: 0 > Memtable switch count: 2872 > Local read count: 0 > Local read latency: NaN ms > Local write count: 1103167888 > Local write latency: 0.025 ms > Pending flushes: 0 > Percent repaired: 0.0 > Bloom filter false positives: 0 > Bloom filter false ratio: 0.0 > Bloom filter space used: 105118296 > Bloom filter off heap memory used: 106547192 > Index summary off heap memory used: 27730962 > Compression metadata off heap memory used: 73174888 > Compacted partition minimum bytes: 61 > Compacted partition maximum bytes: 51012 > Compacted partition mean bytes: 7899 > Average live cells per slice (last five minutes): NaN > Maximum live cells per slice (last five minutes): 0 > Average tombstones per slice (last five minutes): NaN > Maximum tombstones per slice (last five minutes): 0 > Dropped Mutations: 0 > {code} > It looks like a good chunk of the compaction time is lost in > StreamingHistogram.update() (which is used to store the estimated tombstone > drop times). > This could be caused by a huge number of different deletion times which would > makes the bin huge but it this histogram should be capped to 100 keys. It's > more likely caused by the huge number of cells. > A simple solutions could be to only take into accounts part of the cells, the > fact the this table has a TWCS also gives us an additional hint that sampling > deletion times would be fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12905) Retry acquire MV lock on failure instead of throwing WTE on streaming
[ https://issues.apache.org/jira/browse/CASSANDRA-12905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15796949#comment-15796949 ] Paulo Motta commented on CASSANDRA-12905: - Both the reinstated compatibility method from the previous commit ({{Keyspace.apply(mutation, writeCommitlog, updateIndexes, isClReplay, isDeferrable, future)}}) as well as the new {{Keyspace.applyFuture}} did not return a {{CompletableFuture}} unless the {{isDeferrable}} flag was set, but the previous behavior was to return a {{CompletableFuture}} regardless of {{isDeferrable}} value, so to retain the previous semantics I amended this patch with commit {{37e124e81da28b6459c6e150fcd831a6cdab0537}} to always return a {{CompletableFuture}} on the above mentioned methods (CI looked good and Tyler reviewed trivial patch, thanks!) > Retry acquire MV lock on failure instead of throwing WTE on streaming > - > > Key: CASSANDRA-12905 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12905 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging > Environment: centos 6.7 x86_64 >Reporter: Nir Zilka >Assignee: Benjamin Roth >Priority: Critical > Fix For: 3.0.11, 3.10 > > > Hello, > I performed two upgrades to the current cluster (currently 15 nodes, 1 DC, > private VLAN), > first it was 2.2.5.1 and repair worked flawlessly, > second upgrade was to 3.0.9 (with upgradesstables) and also repair worked > well, > then i upgraded 2 weeks ago to 3.9 - and the repair problems started. > there are several errors types from the system.log (different nodes) : > - Sync failed between /xxx.xxx.xxx.xxx and /xxx.xxx.xxx.xxx > - Streaming error occurred on session with peer xxx.xxx.xxx.xxx Operation > timed out - received only 0 responses > - Remote peer xxx.xxx.xxx.xxx failed stream session > - Session completed with the following error > org.apache.cassandra.streaming.StreamException: Stream failed > > i use 3.9 default configuration with the cluster settings adjustments (3 > seeds, GossipingPropertyFileSnitch). > streaming_socket_timeout_in_ms is the default (8640). > i'm afraid from consistency problems while i'm not performing repair. > Any ideas? > Thanks, > Nir. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[7/9] cassandra git commit: Merge branch 'cassandra-3.11' into cassandra-3.X
Merge branch 'cassandra-3.11' into cassandra-3.X Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/04ee4ccb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/04ee4ccb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/04ee4ccb Branch: refs/heads/cassandra-3.X Commit: 04ee4ccb905d273bd4f5f7185491f9cedf4d3f55 Parents: 3f1a3b2 cac7364 Author: Paulo MottaAuthored: Wed Jan 4 00:25:23 2017 -0200 Committer: Paulo Motta Committed: Wed Jan 4 00:25:23 2017 -0200 -- src/java/org/apache/cassandra/db/Keyspace.java | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) --
[1/9] cassandra git commit: Follow-up CASSANDRA-12905: always return future on Keyspace.applyFuture
Repository: cassandra Updated Branches: refs/heads/cassandra-3.11 68f7ce440 -> cac7364e7 refs/heads/cassandra-3.X 3f1a3b2f6 -> 04ee4ccb9 refs/heads/trunk b137bd977 -> a8a43dd32 Follow-up CASSANDRA-12905: always return future on Keyspace.applyFuture Before CASSANDRA-12905, applyFuture always returned a future, regardless of whether isDeferrable was set or not. This behavior should be maintained for applyFuture calls or compatibility method Keyspace.apply(mutation, writeCommitlog, updateIndexes, isClReplay, isDeferrable, future). Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/37e124e8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/37e124e8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/37e124e8 Branch: refs/heads/cassandra-3.11 Commit: 37e124e81da28b6459c6e150fcd831a6cdab0537 Parents: 617bd23 Author: Paulo MottaAuthored: Tue Jan 3 16:47:15 2017 -0200 Committer: Paulo Motta Committed: Wed Jan 4 00:22:48 2017 -0200 -- src/java/org/apache/cassandra/db/Keyspace.java | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/37e124e8/src/java/org/apache/cassandra/db/Keyspace.java -- diff --git a/src/java/org/apache/cassandra/db/Keyspace.java b/src/java/org/apache/cassandra/db/Keyspace.java index 217cf54..7349f42 100644 --- a/src/java/org/apache/cassandra/db/Keyspace.java +++ b/src/java/org/apache/cassandra/db/Keyspace.java @@ -381,13 +381,13 @@ public class Keyspace public CompletableFuture applyFuture(Mutation mutation, boolean writeCommitLog, boolean updateIndexes) { -return applyInternal(mutation, writeCommitLog, updateIndexes, true, true, null); +return applyInternal(mutation, writeCommitLog, updateIndexes, true, true, new CompletableFuture<>()); } public CompletableFuture applyFuture(Mutation mutation, boolean writeCommitLog, boolean updateIndexes, boolean isDroppable, boolean isDeferrable) { -return applyInternal(mutation, writeCommitLog, updateIndexes, isDroppable, isDeferrable, null); +return applyInternal(mutation, writeCommitLog, updateIndexes, isDroppable, isDeferrable, new CompletableFuture<>()); } public void apply(Mutation mutation, boolean writeCommitLog, boolean updateIndexes) @@ -433,7 +433,7 @@ public class Keyspace boolean isDeferrable, CompletableFuture future) { -return applyInternal(mutation, writeCommitLog, updateIndexes, !isClReplay, isDeferrable, future); +return applyInternal(mutation, writeCommitLog, updateIndexes, !isClReplay, isDeferrable, future != null? future : new CompletableFuture<>()); } /** @@ -458,11 +458,6 @@ public class Keyspace boolean requiresViewUpdate = updateIndexes && viewManager.updatesAffectView(Collections.singleton(mutation), false); -// If apply is not deferrable, no future is required, returns always null -if (isDeferrable && future == null) { -future = new CompletableFuture<>(); -} - Lock lock = null; if (requiresViewUpdate) {
[2/9] cassandra git commit: Follow-up CASSANDRA-12905: always return future on Keyspace.applyFuture
Follow-up CASSANDRA-12905: always return future on Keyspace.applyFuture Before CASSANDRA-12905, applyFuture always returned a future, regardless of whether isDeferrable was set or not. This behavior should be maintained for applyFuture calls or compatibility method Keyspace.apply(mutation, writeCommitlog, updateIndexes, isClReplay, isDeferrable, future). Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/37e124e8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/37e124e8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/37e124e8 Branch: refs/heads/cassandra-3.X Commit: 37e124e81da28b6459c6e150fcd831a6cdab0537 Parents: 617bd23 Author: Paulo MottaAuthored: Tue Jan 3 16:47:15 2017 -0200 Committer: Paulo Motta Committed: Wed Jan 4 00:22:48 2017 -0200 -- src/java/org/apache/cassandra/db/Keyspace.java | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/37e124e8/src/java/org/apache/cassandra/db/Keyspace.java -- diff --git a/src/java/org/apache/cassandra/db/Keyspace.java b/src/java/org/apache/cassandra/db/Keyspace.java index 217cf54..7349f42 100644 --- a/src/java/org/apache/cassandra/db/Keyspace.java +++ b/src/java/org/apache/cassandra/db/Keyspace.java @@ -381,13 +381,13 @@ public class Keyspace public CompletableFuture applyFuture(Mutation mutation, boolean writeCommitLog, boolean updateIndexes) { -return applyInternal(mutation, writeCommitLog, updateIndexes, true, true, null); +return applyInternal(mutation, writeCommitLog, updateIndexes, true, true, new CompletableFuture<>()); } public CompletableFuture applyFuture(Mutation mutation, boolean writeCommitLog, boolean updateIndexes, boolean isDroppable, boolean isDeferrable) { -return applyInternal(mutation, writeCommitLog, updateIndexes, isDroppable, isDeferrable, null); +return applyInternal(mutation, writeCommitLog, updateIndexes, isDroppable, isDeferrable, new CompletableFuture<>()); } public void apply(Mutation mutation, boolean writeCommitLog, boolean updateIndexes) @@ -433,7 +433,7 @@ public class Keyspace boolean isDeferrable, CompletableFuture future) { -return applyInternal(mutation, writeCommitLog, updateIndexes, !isClReplay, isDeferrable, future); +return applyInternal(mutation, writeCommitLog, updateIndexes, !isClReplay, isDeferrable, future != null? future : new CompletableFuture<>()); } /** @@ -458,11 +458,6 @@ public class Keyspace boolean requiresViewUpdate = updateIndexes && viewManager.updatesAffectView(Collections.singleton(mutation), false); -// If apply is not deferrable, no future is required, returns always null -if (isDeferrable && future == null) { -future = new CompletableFuture<>(); -} - Lock lock = null; if (requiresViewUpdate) {
[4/9] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11
Merge branch 'cassandra-3.0' into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cac7364e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cac7364e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cac7364e Branch: refs/heads/cassandra-3.11 Commit: cac7364e7709b5ef7ef8e9abedb45c9a11ef8853 Parents: 68f7ce4 37e124e Author: Paulo MottaAuthored: Wed Jan 4 00:23:25 2017 -0200 Committer: Paulo Motta Committed: Wed Jan 4 00:24:08 2017 -0200 -- src/java/org/apache/cassandra/db/Keyspace.java | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cac7364e/src/java/org/apache/cassandra/db/Keyspace.java -- diff --cc src/java/org/apache/cassandra/db/Keyspace.java index 6e7e141,7349f42..a550b1b --- a/src/java/org/apache/cassandra/db/Keyspace.java +++ b/src/java/org/apache/cassandra/db/Keyspace.java @@@ -482,15 -456,9 +482,10 @@@ public class Keyspac if (TEST_FAIL_WRITES && metadata.name.equals(TEST_FAIL_WRITES_KS)) throw new RuntimeException("Testing write failures"); +Lock[] locks = null; + boolean requiresViewUpdate = updateIndexes && viewManager.updatesAffectView(Collections.singleton(mutation), false); - // If apply is not deferrable, no future is required, returns always null - if (isDeferrable && future == null) { - future = new CompletableFuture<>(); - } - -Lock lock = null; if (requiresViewUpdate) { mutation.viewLockAcquireStart.compareAndSet(0L, System.currentTimeMillis());
[9/9] cassandra git commit: Merge branch 'cassandra-3.X' into trunk
Merge branch 'cassandra-3.X' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a8a43dd3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a8a43dd3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a8a43dd3 Branch: refs/heads/trunk Commit: a8a43dd32eb92406d7d8b105e08c68b3d5c7df49 Parents: b137bd9 04ee4cc Author: Paulo MottaAuthored: Wed Jan 4 00:25:53 2017 -0200 Committer: Paulo Motta Committed: Wed Jan 4 00:25:53 2017 -0200 -- src/java/org/apache/cassandra/db/Keyspace.java | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) --
[8/9] cassandra git commit: Merge branch 'cassandra-3.11' into cassandra-3.X
Merge branch 'cassandra-3.11' into cassandra-3.X Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/04ee4ccb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/04ee4ccb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/04ee4ccb Branch: refs/heads/trunk Commit: 04ee4ccb905d273bd4f5f7185491f9cedf4d3f55 Parents: 3f1a3b2 cac7364 Author: Paulo MottaAuthored: Wed Jan 4 00:25:23 2017 -0200 Committer: Paulo Motta Committed: Wed Jan 4 00:25:23 2017 -0200 -- src/java/org/apache/cassandra/db/Keyspace.java | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) --
[6/9] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11
Merge branch 'cassandra-3.0' into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cac7364e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cac7364e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cac7364e Branch: refs/heads/trunk Commit: cac7364e7709b5ef7ef8e9abedb45c9a11ef8853 Parents: 68f7ce4 37e124e Author: Paulo MottaAuthored: Wed Jan 4 00:23:25 2017 -0200 Committer: Paulo Motta Committed: Wed Jan 4 00:24:08 2017 -0200 -- src/java/org/apache/cassandra/db/Keyspace.java | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cac7364e/src/java/org/apache/cassandra/db/Keyspace.java -- diff --cc src/java/org/apache/cassandra/db/Keyspace.java index 6e7e141,7349f42..a550b1b --- a/src/java/org/apache/cassandra/db/Keyspace.java +++ b/src/java/org/apache/cassandra/db/Keyspace.java @@@ -482,15 -456,9 +482,10 @@@ public class Keyspac if (TEST_FAIL_WRITES && metadata.name.equals(TEST_FAIL_WRITES_KS)) throw new RuntimeException("Testing write failures"); +Lock[] locks = null; + boolean requiresViewUpdate = updateIndexes && viewManager.updatesAffectView(Collections.singleton(mutation), false); - // If apply is not deferrable, no future is required, returns always null - if (isDeferrable && future == null) { - future = new CompletableFuture<>(); - } - -Lock lock = null; if (requiresViewUpdate) { mutation.viewLockAcquireStart.compareAndSet(0L, System.currentTimeMillis());
[3/9] cassandra git commit: Follow-up CASSANDRA-12905: always return future on Keyspace.applyFuture
Follow-up CASSANDRA-12905: always return future on Keyspace.applyFuture Before CASSANDRA-12905, applyFuture always returned a future, regardless of whether isDeferrable was set or not. This behavior should be maintained for applyFuture calls or compatibility method Keyspace.apply(mutation, writeCommitlog, updateIndexes, isClReplay, isDeferrable, future). Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/37e124e8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/37e124e8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/37e124e8 Branch: refs/heads/trunk Commit: 37e124e81da28b6459c6e150fcd831a6cdab0537 Parents: 617bd23 Author: Paulo MottaAuthored: Tue Jan 3 16:47:15 2017 -0200 Committer: Paulo Motta Committed: Wed Jan 4 00:22:48 2017 -0200 -- src/java/org/apache/cassandra/db/Keyspace.java | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/37e124e8/src/java/org/apache/cassandra/db/Keyspace.java -- diff --git a/src/java/org/apache/cassandra/db/Keyspace.java b/src/java/org/apache/cassandra/db/Keyspace.java index 217cf54..7349f42 100644 --- a/src/java/org/apache/cassandra/db/Keyspace.java +++ b/src/java/org/apache/cassandra/db/Keyspace.java @@ -381,13 +381,13 @@ public class Keyspace public CompletableFuture applyFuture(Mutation mutation, boolean writeCommitLog, boolean updateIndexes) { -return applyInternal(mutation, writeCommitLog, updateIndexes, true, true, null); +return applyInternal(mutation, writeCommitLog, updateIndexes, true, true, new CompletableFuture<>()); } public CompletableFuture applyFuture(Mutation mutation, boolean writeCommitLog, boolean updateIndexes, boolean isDroppable, boolean isDeferrable) { -return applyInternal(mutation, writeCommitLog, updateIndexes, isDroppable, isDeferrable, null); +return applyInternal(mutation, writeCommitLog, updateIndexes, isDroppable, isDeferrable, new CompletableFuture<>()); } public void apply(Mutation mutation, boolean writeCommitLog, boolean updateIndexes) @@ -433,7 +433,7 @@ public class Keyspace boolean isDeferrable, CompletableFuture future) { -return applyInternal(mutation, writeCommitLog, updateIndexes, !isClReplay, isDeferrable, future); +return applyInternal(mutation, writeCommitLog, updateIndexes, !isClReplay, isDeferrable, future != null? future : new CompletableFuture<>()); } /** @@ -458,11 +458,6 @@ public class Keyspace boolean requiresViewUpdate = updateIndexes && viewManager.updatesAffectView(Collections.singleton(mutation), false); -// If apply is not deferrable, no future is required, returns always null -if (isDeferrable && future == null) { -future = new CompletableFuture<>(); -} - Lock lock = null; if (requiresViewUpdate) {
[5/9] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11
Merge branch 'cassandra-3.0' into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cac7364e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cac7364e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cac7364e Branch: refs/heads/cassandra-3.X Commit: cac7364e7709b5ef7ef8e9abedb45c9a11ef8853 Parents: 68f7ce4 37e124e Author: Paulo MottaAuthored: Wed Jan 4 00:23:25 2017 -0200 Committer: Paulo Motta Committed: Wed Jan 4 00:24:08 2017 -0200 -- src/java/org/apache/cassandra/db/Keyspace.java | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cac7364e/src/java/org/apache/cassandra/db/Keyspace.java -- diff --cc src/java/org/apache/cassandra/db/Keyspace.java index 6e7e141,7349f42..a550b1b --- a/src/java/org/apache/cassandra/db/Keyspace.java +++ b/src/java/org/apache/cassandra/db/Keyspace.java @@@ -482,15 -456,9 +482,10 @@@ public class Keyspac if (TEST_FAIL_WRITES && metadata.name.equals(TEST_FAIL_WRITES_KS)) throw new RuntimeException("Testing write failures"); +Lock[] locks = null; + boolean requiresViewUpdate = updateIndexes && viewManager.updatesAffectView(Collections.singleton(mutation), false); - // If apply is not deferrable, no future is required, returns always null - if (isDeferrable && future == null) { - future = new CompletableFuture<>(); - } - -Lock lock = null; if (requiresViewUpdate) { mutation.viewLockAcquireStart.compareAndSet(0L, System.currentTimeMillis());
cassandra git commit: Follow-up CASSANDRA-12905: always return future on Keyspace.applyFuture
Repository: cassandra Updated Branches: refs/heads/cassandra-3.0 617bd23e8 -> 37e124e81 Follow-up CASSANDRA-12905: always return future on Keyspace.applyFuture Before CASSANDRA-12905, applyFuture always returned a future, regardless of whether isDeferrable was set or not. This behavior should be maintained for applyFuture calls or compatibility method Keyspace.apply(mutation, writeCommitlog, updateIndexes, isClReplay, isDeferrable, future). Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/37e124e8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/37e124e8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/37e124e8 Branch: refs/heads/cassandra-3.0 Commit: 37e124e81da28b6459c6e150fcd831a6cdab0537 Parents: 617bd23 Author: Paulo MottaAuthored: Tue Jan 3 16:47:15 2017 -0200 Committer: Paulo Motta Committed: Wed Jan 4 00:22:48 2017 -0200 -- src/java/org/apache/cassandra/db/Keyspace.java | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/37e124e8/src/java/org/apache/cassandra/db/Keyspace.java -- diff --git a/src/java/org/apache/cassandra/db/Keyspace.java b/src/java/org/apache/cassandra/db/Keyspace.java index 217cf54..7349f42 100644 --- a/src/java/org/apache/cassandra/db/Keyspace.java +++ b/src/java/org/apache/cassandra/db/Keyspace.java @@ -381,13 +381,13 @@ public class Keyspace public CompletableFuture applyFuture(Mutation mutation, boolean writeCommitLog, boolean updateIndexes) { -return applyInternal(mutation, writeCommitLog, updateIndexes, true, true, null); +return applyInternal(mutation, writeCommitLog, updateIndexes, true, true, new CompletableFuture<>()); } public CompletableFuture applyFuture(Mutation mutation, boolean writeCommitLog, boolean updateIndexes, boolean isDroppable, boolean isDeferrable) { -return applyInternal(mutation, writeCommitLog, updateIndexes, isDroppable, isDeferrable, null); +return applyInternal(mutation, writeCommitLog, updateIndexes, isDroppable, isDeferrable, new CompletableFuture<>()); } public void apply(Mutation mutation, boolean writeCommitLog, boolean updateIndexes) @@ -433,7 +433,7 @@ public class Keyspace boolean isDeferrable, CompletableFuture future) { -return applyInternal(mutation, writeCommitLog, updateIndexes, !isClReplay, isDeferrable, future); +return applyInternal(mutation, writeCommitLog, updateIndexes, !isClReplay, isDeferrable, future != null? future : new CompletableFuture<>()); } /** @@ -458,11 +458,6 @@ public class Keyspace boolean requiresViewUpdate = updateIndexes && viewManager.updatesAffectView(Collections.singleton(mutation), false); -// If apply is not deferrable, no future is required, returns always null -if (isDeferrable && future == null) { -future = new CompletableFuture<>(); -} - Lock lock = null; if (requiresViewUpdate) {
[jira] [Commented] (CASSANDRA-13039) Mutation time mostly spent in LinkedBlockingQueue.put() when writing with ONE
[ https://issues.apache.org/jira/browse/CASSANDRA-13039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15796400#comment-15796400 ] Jason Brown commented on CASSANDRA-13039: - The only difference between QUORUM and ONE is the number of replica nodes that you are waiting for acks from. If you are using a token-aware client, then it will send the request to a replica, but that node *still* waits for the ack from the write - it's just that the ack is coming from within the same process (and doesn't need to wait on the network for that ack). > Mutation time mostly spent in LinkedBlockingQueue.put() when writing with ONE > - > > Key: CASSANDRA-13039 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13039 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Corentin Chary > Attachments: mutation-linkedlist-block.png, profiler-snapshot.nps > > > On a setup with a sustained write load of 70kQPS per node and a RF of 2 it > looks like most of the mutation time is spend in > OutboundTcpConnection.enqueue() -> backlog.put() > backlog is an unbounded LinkedBlockingQueue, which means that .put() can only > be blocking if a lock is taken. I strongly suspect that this is caused by the > use of drainTo() in CoalescingStrategies which is causing contention for the > producers. > On the other hand, not using drainTo() could lead to starvation of the > consumers. > Possible solutions: > - Allow multiple connections per size and per hosts in > OutboundTcpConnectionPool > - Switch from drainTo to multiple take() > - Switch to ConcurrentLinkedQueue (which is lockless), also means we need > active polling. > Maybe a good solution would be something hybrid: a bounded > LinkedBlockingQueue and an unbounded ConcurrentLinkedQueue. This way you get > low latency when you don't have a lot of messages, and throughput when you do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13039) Mutation time mostly spent in LinkedBlockingQueue.put() when writing with ONE
[ https://issues.apache.org/jira/browse/CASSANDRA-13039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15796392#comment-15796392 ] Jason Brown commented on CASSANDRA-13039: - [~iksaif] For background, we used to do one-off {{take()}} s from the LBQ, but we switched to grabbing elements in bulk (via {{#drainTo()}}) with CASSANDRA-1632 (which was before coalescing was introduced). > Mutation time mostly spent in LinkedBlockingQueue.put() when writing with ONE > - > > Key: CASSANDRA-13039 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13039 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Corentin Chary > Attachments: mutation-linkedlist-block.png, profiler-snapshot.nps > > > On a setup with a sustained write load of 70kQPS per node and a RF of 2 it > looks like most of the mutation time is spend in > OutboundTcpConnection.enqueue() -> backlog.put() > backlog is an unbounded LinkedBlockingQueue, which means that .put() can only > be blocking if a lock is taken. I strongly suspect that this is caused by the > use of drainTo() in CoalescingStrategies which is causing contention for the > producers. > On the other hand, not using drainTo() could lead to starvation of the > consumers. > Possible solutions: > - Allow multiple connections per size and per hosts in > OutboundTcpConnectionPool > - Switch from drainTo to multiple take() > - Switch to ConcurrentLinkedQueue (which is lockless), also means we need > active polling. > Maybe a good solution would be something hybrid: a bounded > LinkedBlockingQueue and an unbounded ConcurrentLinkedQueue. This way you get > low latency when you don't have a lot of messages, and throughput when you do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13018) Exceptions encountered calling getSeeds() breaks messaging service
[ https://issues.apache.org/jira/browse/CASSANDRA-13018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15796372#comment-15796372 ] Jason Brown commented on CASSANDRA-13018: - [~brandon.williams] Thanks for the info and the link to the ticket. If we decide to keep the log message, I think it's in the wrong place. Currently, it's in the block that starts with {{if(maxTargetVersion == NO_VERSION)}}, and that will only occur when we fail to connect to the peer. In that case the log message would read: {{Seed gossip version is -2147483648; will not connect with that version}}, where "-2147483648" is {{Integer.MIN_VALUE}}. I think this log message is more correctly placed in the {{if (targetVersion > maxTargetVersion)}} block, because then we've connected to and received the peer's messaging protocol version. WDYT? In either case, [~jjirsa]'s exception checking code should be added. I just want to make sure the actual thing it's guarding is executed in the correct place. > Exceptions encountered calling getSeeds() breaks messaging service > -- > > Key: CASSANDRA-13018 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13018 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Jeff Jirsa >Assignee: Jeff Jirsa > Labels: lhf > Attachments: > 0001-Better-handle-config-errors-during-outbound-connecti.patch > > > OutboundTcpConnection.connect() calls getSeeds(). If getSeeds() throws an > exception (for example, DD/Config invalid yaml error), messaging thread(s) > break(s). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13084) Avoid byte-array copy when key cache is disabled
[ https://issues.apache.org/jira/browse/CASSANDRA-13084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Brown updated CASSANDRA-13084: Resolution: Fixed Fix Version/s: 4.0 3.12 Status: Resolved (was: Patch Available) > Avoid byte-array copy when key cache is disabled > > > Key: CASSANDRA-13084 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13084 > Project: Cassandra > Issue Type: Bug >Reporter: Marcus Olsson >Assignee: Marcus Olsson >Priority: Trivial > Fix For: 3.12, 4.0 > > Attachments: CASSANDRA-13084-3.0.patch, CASSANDRA-13084-3.X.patch > > > While profiling a cluster with the key cache disabled some unnecessary heap > pressure was observed. It seems that even though the key cache is disabled we > still create the *KeyCacheKey* object which uses _ByteBufferUtil.getArray()_ > to copy the keys byte array. > I don't believe it's a big issue but it's still unnecessary when not using > the key cache. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13084) Avoid byte-array copy when key cache is disabled
[ https://issues.apache.org/jira/browse/CASSANDRA-13084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15796336#comment-15796336 ] Jason Brown commented on CASSANDRA-13084: - +1, committed as sha b137bd9778ca51cc30d2cfa290489b776951ca71 to 3.X and trunk > Avoid byte-array copy when key cache is disabled > > > Key: CASSANDRA-13084 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13084 > Project: Cassandra > Issue Type: Bug >Reporter: Marcus Olsson >Assignee: Marcus Olsson >Priority: Trivial > Attachments: CASSANDRA-13084-3.0.patch, CASSANDRA-13084-3.X.patch > > > While profiling a cluster with the key cache disabled some unnecessary heap > pressure was observed. It seems that even though the key cache is disabled we > still create the *KeyCacheKey* object which uses _ByteBufferUtil.getArray()_ > to copy the keys byte array. > I don't believe it's a big issue but it's still unnecessary when not using > the key cache. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[1/3] cassandra git commit: Avoid creating KeyCacheKey instance when key cache is disabled
Repository: cassandra Updated Branches: refs/heads/cassandra-3.X 917d13f00 -> 3f1a3b2f6 refs/heads/trunk 87b1bb87a -> b137bd977 Avoid creating KeyCacheKey instance when key cache is disabled patch by Marcus Olsson; reviewed by jasobrown for CASSANDRA-13084 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3f1a3b2f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3f1a3b2f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3f1a3b2f Branch: refs/heads/cassandra-3.X Commit: 3f1a3b2f60fed7b161cb0ddde6c8dda554cba624 Parents: 917d13f Author: Marcus OlssonAuthored: Thu Dec 29 10:58:09 2016 +0100 Committer: Jason Brown Committed: Tue Jan 3 14:02:10 2017 -0800 -- CHANGES.txt| 1 + .../cassandra/io/sstable/format/SSTableReader.java | 13 +++-- .../io/sstable/format/big/BigTableReader.java | 4 +--- 3 files changed, 13 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f1a3b2f/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 0557467..9ed66fd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.12 + * Avoid byte-array copy when key cache is disabled (CASANDRA-13084) * More fixes to the TokenAllocator (CASSANDRA-12990) * Require forceful decommission if number of nodes is less than replication factor (CASSANDRA-12510) * Allow IN restrictions on column families with collections (CASSANDRA-12654) http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f1a3b2f/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java -- diff --git a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java index 56609b3..5d24f31 100644 --- a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java +++ b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java @@ -1496,12 +1496,16 @@ public abstract class SSTableReader extends SSTable implements SelfRefCounted 0 && metadata.params.caching.cacheKeys()) +if (keyCacheEnabled()) { if (updateStats) { @@ -1522,6 +1526,11 @@ public abstract class SSTableReader extends SSTable implements SelfRefCounted 0 && metadata.params.caching.cacheKeys(); +} + /** * Get position updating key cache and stats. * @see #getPosition(PartitionPosition, SSTableReader.Operator, boolean) http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f1a3b2f/src/java/org/apache/cassandra/io/sstable/format/big/BigTableReader.java -- diff --git a/src/java/org/apache/cassandra/io/sstable/format/big/BigTableReader.java b/src/java/org/apache/cassandra/io/sstable/format/big/BigTableReader.java index 8c64b01..3d14aca 100644 --- a/src/java/org/apache/cassandra/io/sstable/format/big/BigTableReader.java +++ b/src/java/org/apache/cassandra/io/sstable/format/big/BigTableReader.java @@ -147,9 +147,7 @@ public class BigTableReader extends SSTableReader // next, the key cache (only make sense for valid row key) if ((op == Operator.EQ || op == Operator.GE) && (key instanceof DecoratedKey)) { -DecoratedKey decoratedKey = (DecoratedKey)key; -KeyCacheKey cacheKey = new KeyCacheKey(metadata.ksAndCFName, descriptor, decoratedKey.getKey()); -RowIndexEntry cachedPosition = getCachedPosition(cacheKey, updateCacheAndStats); +RowIndexEntry cachedPosition = getCachedPosition((DecoratedKey)key, updateCacheAndStats); if (cachedPosition != null) { Tracing.trace("Key cache hit for sstable {}", descriptor.generation);
[2/3] cassandra git commit: Avoid creating KeyCacheKey instance when key cache is disabled
Avoid creating KeyCacheKey instance when key cache is disabled patch by Marcus Olsson; reviewed by jasobrown for CASSANDRA-13084 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3f1a3b2f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3f1a3b2f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3f1a3b2f Branch: refs/heads/trunk Commit: 3f1a3b2f60fed7b161cb0ddde6c8dda554cba624 Parents: 917d13f Author: Marcus OlssonAuthored: Thu Dec 29 10:58:09 2016 +0100 Committer: Jason Brown Committed: Tue Jan 3 14:02:10 2017 -0800 -- CHANGES.txt| 1 + .../cassandra/io/sstable/format/SSTableReader.java | 13 +++-- .../io/sstable/format/big/BigTableReader.java | 4 +--- 3 files changed, 13 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f1a3b2f/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 0557467..9ed66fd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.12 + * Avoid byte-array copy when key cache is disabled (CASANDRA-13084) * More fixes to the TokenAllocator (CASSANDRA-12990) * Require forceful decommission if number of nodes is less than replication factor (CASSANDRA-12510) * Allow IN restrictions on column families with collections (CASSANDRA-12654) http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f1a3b2f/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java -- diff --git a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java index 56609b3..5d24f31 100644 --- a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java +++ b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java @@ -1496,12 +1496,16 @@ public abstract class SSTableReader extends SSTable implements SelfRefCounted 0 && metadata.params.caching.cacheKeys()) +if (keyCacheEnabled()) { if (updateStats) { @@ -1522,6 +1526,11 @@ public abstract class SSTableReader extends SSTable implements SelfRefCounted 0 && metadata.params.caching.cacheKeys(); +} + /** * Get position updating key cache and stats. * @see #getPosition(PartitionPosition, SSTableReader.Operator, boolean) http://git-wip-us.apache.org/repos/asf/cassandra/blob/3f1a3b2f/src/java/org/apache/cassandra/io/sstable/format/big/BigTableReader.java -- diff --git a/src/java/org/apache/cassandra/io/sstable/format/big/BigTableReader.java b/src/java/org/apache/cassandra/io/sstable/format/big/BigTableReader.java index 8c64b01..3d14aca 100644 --- a/src/java/org/apache/cassandra/io/sstable/format/big/BigTableReader.java +++ b/src/java/org/apache/cassandra/io/sstable/format/big/BigTableReader.java @@ -147,9 +147,7 @@ public class BigTableReader extends SSTableReader // next, the key cache (only make sense for valid row key) if ((op == Operator.EQ || op == Operator.GE) && (key instanceof DecoratedKey)) { -DecoratedKey decoratedKey = (DecoratedKey)key; -KeyCacheKey cacheKey = new KeyCacheKey(metadata.ksAndCFName, descriptor, decoratedKey.getKey()); -RowIndexEntry cachedPosition = getCachedPosition(cacheKey, updateCacheAndStats); +RowIndexEntry cachedPosition = getCachedPosition((DecoratedKey)key, updateCacheAndStats); if (cachedPosition != null) { Tracing.trace("Key cache hit for sstable {}", descriptor.generation);
[3/3] cassandra git commit: Merge branch 'cassandra-3.X' into trunk
Merge branch 'cassandra-3.X' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b137bd97 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b137bd97 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b137bd97 Branch: refs/heads/trunk Commit: b137bd9778ca51cc30d2cfa290489b776951ca71 Parents: 87b1bb8 3f1a3b2 Author: Jason BrownAuthored: Tue Jan 3 14:02:56 2017 -0800 Committer: Jason Brown Committed: Tue Jan 3 14:03:55 2017 -0800 -- CHANGES.txt| 1 + .../cassandra/io/sstable/format/SSTableReader.java | 13 +++-- .../io/sstable/format/big/BigTableReader.java | 4 +--- 3 files changed, 13 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b137bd97/CHANGES.txt -- diff --cc CHANGES.txt index a564bc9,9ed66fd..08eed35 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,15 -1,5 +1,16 @@@ +4.0 + * Use Caffeine (W-TinyLFU) for on-heap caches (CASSANDRA-10855) + * Thrift removal (CASSANDRA-5) + * Remove pre-3.0 compatibility code for 4.0 (CASSANDRA-12716) + * Add column definition kind to dropped columns in schema (CASSANDRA-12705) + * Add (automate) Nodetool Documentation (CASSANDRA-12672) + * Update bundled cqlsh python driver to 3.7.0 (CASSANDRA-12736) + * Reject invalid replication settings when creating or altering a keyspace (CASSANDRA-12681) + * Clean up the SSTableReader#getScanner API wrt removal of RateLimiter (CASSANDRA-12422) + + 3.12 - * Avoid byte-array copy when key cache is disabled (CASANDRA-13084) ++ * Avoid byte-array copy when key cache is disabled (CASSANDRA-13084) * More fixes to the TokenAllocator (CASSANDRA-12990) * Require forceful decommission if number of nodes is less than replication factor (CASSANDRA-12510) * Allow IN restrictions on column families with collections (CASSANDRA-12654) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b137bd97/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b137bd97/src/java/org/apache/cassandra/io/sstable/format/big/BigTableReader.java --
[jira] [Commented] (CASSANDRA-4663) Streaming sends one file at a time serially.
[ https://issues.apache.org/jira/browse/CASSANDRA-4663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15796141#comment-15796141 ] Jason Brown commented on CASSANDRA-4663: [~iksaif] Unfortunately, I believe this patch isn't going to do what you want. In the existing code, {{connectionsPerHost}} is passed down to {{StreamCoordinator}}, where it is primarily going to be used on the side that is transferring files https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/streaming/StreamCoordinator.java#L189. In {{StreamCoordinator#sliceSSTableDetails()}}, we essentially round robin the sstable chunks across the number of connections we will use. It's also referenced from {{HostStreamingData#getOrCreateNextSession()}}, but that's not going to increase the inbound sessions (see next paragraph). Your current patch sets the {{connectionsPerHost}} at the receiver end of the stream (even though it would be the node that is initiating the stream session). As it's a bootstrapping node that is requesting the ranges from the peer, and given the structure and protocol of the current stream session implementation (session and protocol are essentially sequential, single threaded, and expect a single socket), I think you'd need to get down into session and protocol management code (and muck with a whole lot) in order to to parallelize from the (non-initiating) sending node. I'm happy to be wrong about my understanding here, so if you've tested it out and have seen good gains, please share :). > Streaming sends one file at a time serially. > - > > Key: CASSANDRA-4663 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4663 > Project: Cassandra > Issue Type: Improvement >Reporter: sankalp kohli >Priority: Minor > Fix For: 3.x > > Attachments: > 0001-streaming-add-a-way-to-configure-the-number-of-conne.patch > > > This is not fast enough when someone is using SSD and may be 10G link. We > should try to create multiple connections and send multiple files in > parallel. > Current approach under utilize the link(even 1G). > This change will improve the bootstrapping time of a node. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-4663) Streaming sends one file at a time serially.
[ https://issues.apache.org/jira/browse/CASSANDRA-4663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15796085#comment-15796085 ] Jason Brown commented on CASSANDRA-4663: [~jlida]: [~iksaif]'s current patch only addresses bootstrap and rebuild (which can be seen as a variant of bootstrap) > Streaming sends one file at a time serially. > - > > Key: CASSANDRA-4663 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4663 > Project: Cassandra > Issue Type: Improvement >Reporter: sankalp kohli >Priority: Minor > Fix For: 3.x > > Attachments: > 0001-streaming-add-a-way-to-configure-the-number-of-conne.patch > > > This is not fast enough when someone is using SSD and may be 10G link. We > should try to create multiple connections and send multiple files in > parallel. > Current approach under utilize the link(even 1G). > This change will improve the bootstrapping time of a node. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-10825) OverloadedException is untested
[ https://issues.apache.org/jira/browse/CASSANDRA-10825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-10825: -- Status: Open (was: Patch Available) > OverloadedException is untested > --- > > Key: CASSANDRA-10825 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10825 > Project: Cassandra > Issue Type: Bug > Components: Local Write-Read Paths >Reporter: Ariel Weisberg >Assignee: Edward Capriolo > Attachments: jmx-hint.png > > > If you grep test/src and cassandra-dtest you will find that the string > OverloadedException doesn't appear anywhere. > In CASSANDRA-10477 it was found that there were cases where Paxos should > back-pressure and throw OverloadedException but didn't. > If OverloadedException is used for functional purposes then we should test > that it is thrown under expected conditions. If there are behaviors driven by > catching or tracking OverloadedException we should test those as well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10825) OverloadedException is untested
[ https://issues.apache.org/jira/browse/CASSANDRA-10825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15796007#comment-15796007 ] Aleksey Yeschenko commented on CASSANDRA-10825: --- Ok, this is deeply stupid and also embarrassing. The reason it never gets updated is that {{hintsInProgress}} isn't a cache, it's an instance of {{CacheLoader}}. Meaning calls to {{load()}} always return the initial value. Very, very stupid. Worse, it got committed by me 3 years ago, back when I didn't know any better. In CASSANDRA-6007. [~appodictic] Your patch goes way beyond what needs to be fixed, nor do I think it addresses the original concern from Ariel (the problem lies deeper). You did however fix CASSANDRA-6007 breakage just by introducing the {{LoadingCache}}. I'd ask you to go with the minimal change here, given that this should be in 2.1+, and get a v2 that *only* changes {{StorageProxy.hintsInProgress}} from {{CacheLoader}} to the intended {{LoadingCache}}. Or I can extract it for you instead. Replacing {{AtomicLong}} with {{Counter}} and introducing new metrics is beyond the scope of the bug fix - feel free to open a 3.X or trunk ticket for that, separately. > OverloadedException is untested > --- > > Key: CASSANDRA-10825 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10825 > Project: Cassandra > Issue Type: Bug > Components: Local Write-Read Paths >Reporter: Ariel Weisberg >Assignee: Edward Capriolo > Attachments: jmx-hint.png > > > If you grep test/src and cassandra-dtest you will find that the string > OverloadedException doesn't appear anywhere. > In CASSANDRA-10477 it was found that there were cases where Paxos should > back-pressure and throw OverloadedException but didn't. > If OverloadedException is used for functional purposes then we should test > that it is thrown under expected conditions. If there are behaviors driven by > catching or tracking OverloadedException we should test those as well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12982) Customizable hint ttl has been removed
[ https://issues.apache.org/jira/browse/CASSANDRA-12982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795996#comment-15795996 ] Blake Eggleston commented on CASSANDRA-12982: - bq. Re-encoding the vint here isn't really an issue, so no real need to avoid it. The name and usage of the method implies that it’s just reading some bytes out of an input, with some additional logic to bail out early if the encoded hint is dead. To me, the method actually recomputing some of the bytes it's returning seems very wrong. Someone reading HintsReader wouldn’t expect the method to behave that way, and there doesn’t seem to be any benefit to doing it that way. It’s slightly riskier, no faster, and approximately as understandable as just copying the bytes. {quote} I'm not a big fan, conceptually, of a conditional method with a name like deserializeIfLive taking a force argument that basically turns it into an unconditional deserializer (and making two or the arguments useless). I much rather prefer some minor duplication to increased complexity but DRY-ness. {quote} That’s reasonable, I’ve pushed up a commit changing that. bq. If you don't mind strongly, I'd like to give it another go once back from vacation/bank holidays - to make it a bit simpler and conceptually right, also ideally in a way that would avoid having to pass size to deserializeIfLive. Sure, go for it. I’d also prefer not passing size to deserializeIfLive, but didn’t see a straightforward way of making that work. > Customizable hint ttl has been removed > -- > > Key: CASSANDRA-12982 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12982 > Project: Cassandra > Issue Type: Bug >Reporter: Blake Eggleston >Assignee: Blake Eggleston >Priority: Minor > Fix For: 3.x > > > The cassandra.maxHintTTL property added in CASSANDRA-5988 was removed in the > hint system rewrite for 3.0. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CASSANDRA-13093) 2.2.8 Node goes down with MUTATION messages were dropped in last 5000 ms: 29 for internal timeout
sutanu das created CASSANDRA-13093: -- Summary: 2.2.8 Node goes down with MUTATION messages were dropped in last 5000 ms: 29 for internal timeout Key: CASSANDRA-13093 URL: https://issues.apache.org/jira/browse/CASSANDRA-13093 Project: Cassandra Issue Type: Bug Components: Core Environment: 2.2.8 Cassandra on 4 Nodes with Red Hat Linux 6.2 64 Bit Reporter: sutanu das Priority: Critical Issue: 1st Node of 4 Node in Cluster keeps aborting (jvm crashing) with following messages: - ReadTimeoutException: Operation timed out - received only 0 responses - MUTATION messages were dropped in last 5000 ms: 29 for internal timeout and 0 for cross node timeout - Spark Jobs getting Q'd up when opening Channels, followed up Read Time Outs: ERROR [SharedPool-Worker-207] 2017-01-03 16:39:00,493 Message.java:611 - Unexpected exception during request; channel = [id: 0xd0b0d36d, /216.12.229.180:41896 :> /172.17.30.47:9042] java.lang.RuntimeException: org.apache.cassandra.exceptions.ReadTimeoutException: Operation timed out - received only 0 responses. What has been done so far? - Host Reboot node 01 - Mutiple C* restarts - Increased read_request_timeout_in_ms from 1 to 5 - Increased request_timeout_in_ms from 1 to 5 - Changed following: concurrent_reads: 128 concurrent_writes: 128 concurrent_counter_writes: 128 - Upgrade to 2.2.8 - All Nodes Sync with 2.2.8 - All nodes have same Pass Auth Scheme (Node 03 was a mis-match and was fixed) - authenticator: org.apache.cassandra.auth.PasswordAuthenticator - authorizer: org.apache.cassandra.auth.CassandraAuthorizer Full exception stack: DEBUG [SharedPool-Worker-10] 2017-01-03 16:32:43,983 StorageProxy.java:1898 - Range slice timeout; received 0 of 1 responses for range 1 of 1 INFO [Service Thread] 2017-01-03 16:32:43,983 GCInspector.java:284 - ParNew GC in 247ms. CMS Old Gen: 3768220776 -> 3996971216; Par Eden Space: 1718091776 -> 0; INFO [Service Thread] 2017-01-03 16:32:43,983 StatusLogger.java:52 - Pool Name Active Pending Completed Blocked All Time Blocked DEBUG [SharedPool-Worker-26] 2017-01-03 16:32:43,984 FileCacheService.java:102 - Evicting cold readers for /cassandra/data/system_auth/roles-5bc52802de2535edaeab188eecebb090/la-51-big-Data.db DEBUG [SharedPool-Worker-28] 2017-01-03 16:32:43,986 AbstractQueryPager.java:89 - Got empty set of rows, considering pager exhausted INFO [ScheduledTasks:1] 2017-01-03 16:39:00,473 MessagingService.java:946 - RANGE_SLICE messages were dropped in last 5000 ms: 2 for internal timeout and 0 for cross node timeout INFO [Service Thread] 2017-01-03 16:39:00,476 StatusLogger.java:106 - sales.airwave_dwell_time_det_hr 0,0 ERROR [SharedPool-Worker-207] 2017-01-03 16:39:00,493 Message.java:611 - Unexpected exception during request; channel = [id: 0xd0b0d36d, /216.12.229.180:41896 :> /172.17.30.47:9042] java.lang.RuntimeException: org.apache.cassandra.exceptions.ReadTimeoutException: Operation timed out - received only 0 responses. at org.apache.cassandra.auth.CassandraRoleManager.getRole(CassandraRoleManager.java:497) ~[apache-cassandra-2.2.8.jar:2.2.8] at org.apache.cassandra.auth.CassandraRoleManager.canLogin(CassandraRoleManager.java:306) ~[apache-cassandra-2.2.8.jar:2.2.8] at org.apache.cassandra.service.ClientState.login(ClientState.java:269) ~[apache-cassandra-2.2.8.jar:2.2.8] at org.apache.cassandra.transport.messages.AuthResponse.execute(AuthResponse.java:79) ~[apache-cassandra-2.2.8.jar:2.2.8] at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:507) [apache-cassandra-2.2.8.jar:2.2.8] at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:401) [apache-cassandra-2.2.8.jar:2.2.8] at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [netty-all-4.0.23.Final.jar:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-all-4.0.23.Final.jar:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32) [netty-all-4.0.23.Final.jar:4.0.23.Final] at io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324) [netty-all-4.0.23.Final.jar:4.0.23.Final] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_65] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164) [apache-cassandra-2.2.8.jar:2.2.8] at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105)
[jira] [Commented] (CASSANDRA-13018) Exceptions encountered calling getSeeds() breaks messaging service
[ https://issues.apache.org/jira/browse/CASSANDRA-13018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795930#comment-15795930 ] Brandon Williams commented on CASSANDRA-13018: -- I added it, post facto, as part of CASSANDRA-8768, since there's no other way of detecting that particular problem. > Exceptions encountered calling getSeeds() breaks messaging service > -- > > Key: CASSANDRA-13018 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13018 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Jeff Jirsa >Assignee: Jeff Jirsa > Labels: lhf > Attachments: > 0001-Better-handle-config-errors-during-outbound-connecti.patch > > > OutboundTcpConnection.connect() calls getSeeds(). If getSeeds() throws an > exception (for example, DD/Config invalid yaml error), messaging thread(s) > break(s). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13018) Exceptions encountered calling getSeeds() breaks messaging service
[ https://issues.apache.org/jira/browse/CASSANDRA-13018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795901#comment-15795901 ] Jason Brown commented on CASSANDRA-13018: - On the whole, +1 to this patch and better code resilience. However, that whole call to {{DatabaseDescriptor#getSeeds()}} has always looked funny to me. [~brandon.williams] added this, not associated with any jira. Brandon, can you shed some light on this, especially when the log message won't tell us much (in terms of the messaging version of the peer), as the only reason why {{maxTargetVersion == NO_VERSION}} is if we failed to connect to the peer. tbh, I'm more in the opinion of removing the {{if (..)}} and the logged message altogether as we've seen that call to {{DatabaseDescriptor#getSeeds()}} spam the logs, hence why we limited the yaml logging in CASSANDRA-11217. > Exceptions encountered calling getSeeds() breaks messaging service > -- > > Key: CASSANDRA-13018 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13018 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Jeff Jirsa >Assignee: Jeff Jirsa > Labels: lhf > Attachments: > 0001-Better-handle-config-errors-during-outbound-connecti.patch > > > OutboundTcpConnection.connect() calls getSeeds(). If getSeeds() throws an > exception (for example, DD/Config invalid yaml error), messaging thread(s) > break(s). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13018) Exceptions encountered calling getSeeds() breaks messaging service
[ https://issues.apache.org/jira/browse/CASSANDRA-13018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Brown updated CASSANDRA-13018: Reviewer: Jason Brown > Exceptions encountered calling getSeeds() breaks messaging service > -- > > Key: CASSANDRA-13018 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13018 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Jeff Jirsa >Assignee: Jeff Jirsa > Labels: lhf > Attachments: > 0001-Better-handle-config-errors-during-outbound-connecti.patch > > > OutboundTcpConnection.connect() calls getSeeds(). If getSeeds() throws an > exception (for example, DD/Config invalid yaml error), messaging thread(s) > break(s). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13084) Avoid byte-array copy when key cache is disabled
[ https://issues.apache.org/jira/browse/CASSANDRA-13084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795841#comment-15795841 ] Jason Brown commented on CASSANDRA-13084: - As this is not really a bug fix (a perf improvement), I'll consider this for 3.X and trunk. On the whole, lgtm, and I've created branches with the patch to run on cassci: ||3.X||trunk|| |[branch|https://github.com/jasobrown/cassandra/tree/13084-3.X]|[branch|https://github.com/jasobrown/cassandra/tree/13084-trunk]| |[dtest|http://cassci.datastax.com/view/Dev/view/jasobrown/job/jasobrown-13084-3.X-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/jasobrown/job/jasobrown-13084-trunk-dtest/]| |[testall|http://cassci.datastax.com/view/Dev/view/jasobrown/job/jasobrown-13084-3.X-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/jasobrown/job/jasobrown-13084-trunk-testall/]| I'm everything passes, I'll commit > Avoid byte-array copy when key cache is disabled > > > Key: CASSANDRA-13084 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13084 > Project: Cassandra > Issue Type: Bug >Reporter: Marcus Olsson >Assignee: Marcus Olsson >Priority: Trivial > Attachments: CASSANDRA-13084-3.0.patch, CASSANDRA-13084-3.X.patch > > > While profiling a cluster with the key cache disabled some unnecessary heap > pressure was observed. It seems that even though the key cache is disabled we > still create the *KeyCacheKey* object which uses _ByteBufferUtil.getArray()_ > to copy the keys byte array. > I don't believe it's a big issue but it's still unnecessary when not using > the key cache. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13084) Avoid byte-array copy when key cache is disabled
[ https://issues.apache.org/jira/browse/CASSANDRA-13084?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Brown updated CASSANDRA-13084: Reviewer: Jason Brown > Avoid byte-array copy when key cache is disabled > > > Key: CASSANDRA-13084 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13084 > Project: Cassandra > Issue Type: Bug >Reporter: Marcus Olsson >Assignee: Marcus Olsson >Priority: Trivial > Attachments: CASSANDRA-13084-3.0.patch, CASSANDRA-13084-3.X.patch > > > While profiling a cluster with the key cache disabled some unnecessary heap > pressure was observed. It seems that even though the key cache is disabled we > still create the *KeyCacheKey* object which uses _ByteBufferUtil.getArray()_ > to copy the keys byte array. > I don't believe it's a big issue but it's still unnecessary when not using > the key cache. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13083) Fix dtest for CASSANDRA-13080
[ https://issues.apache.org/jira/browse/CASSANDRA-13083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dikang Gu updated CASSANDRA-13083: -- Description: Fix the dtest failures. https://cassci.datastax.com/view/Dev/view/DikangGu/job/DikangGu-CASSANDRA-13080-trunk-dtest/5/testReport/ > Fix dtest for CASSANDRA-13080 > - > > Key: CASSANDRA-13083 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13083 > Project: Cassandra > Issue Type: Sub-task > Components: Core >Reporter: Dikang Gu >Assignee: Dikang Gu > Fix For: 3.12 > > > Fix the dtest failures. > https://cassci.datastax.com/view/Dev/view/DikangGu/job/DikangGu-CASSANDRA-13080-trunk-dtest/5/testReport/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13083) Fix dtest for CASSANDRA-13080
[ https://issues.apache.org/jira/browse/CASSANDRA-13083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dikang Gu updated CASSANDRA-13083: -- Summary: Fix dtest for CASSANDRA-13080 (was: Add dtest for CASSANDRA-13080) > Fix dtest for CASSANDRA-13080 > - > > Key: CASSANDRA-13083 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13083 > Project: Cassandra > Issue Type: Sub-task > Components: Core >Reporter: Dikang Gu >Assignee: Dikang Gu > Fix For: 3.12 > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-13080) Use new token allocation for non bootstrap case as well.
[ https://issues.apache.org/jira/browse/CASSANDRA-13080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795791#comment-15795791 ] Dikang Gu edited comment on CASSANDRA-13080 at 1/3/17 6:41 PM: --- some dtests failed, should because it does not create the keyspace before bootstrapping more nodes, I will fix them before committing this. https://cassci.datastax.com/view/Dev/view/DikangGu/job/DikangGu-CASSANDRA-13080-trunk-dtest/5/testReport/ was (Author: dikanggu): some dtests failed, should because it does not create the keyspace before bootstrapping more nodes, I will fix them before committing this. > Use new token allocation for non bootstrap case as well. > > > Key: CASSANDRA-13080 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13080 > Project: Cassandra > Issue Type: Improvement > Components: Core >Reporter: Dikang Gu >Assignee: Dikang Gu > Fix For: 3.12 > > > There are couple reasons I think we should use the new token allocation for > non bootstrap case as well. > 1. In some cases, We want to bring up nodes, but do not need to stream any > data to the new nodes. So we want to allocate correct tokens, and skip the > JOIN state, which should avoid triggering pending range calculation on other > nodes as well. On use case is when we bring up a new DC. > 2. We can unify the token allocation code path for both bootstrap and > non-bootstrap use case. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13080) Use new token allocation for non bootstrap case as well.
[ https://issues.apache.org/jira/browse/CASSANDRA-13080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795791#comment-15795791 ] Dikang Gu commented on CASSANDRA-13080: --- some dtests failed, should because it does not create the keyspace before bootstrapping more nodes, I will fix them before committing this. > Use new token allocation for non bootstrap case as well. > > > Key: CASSANDRA-13080 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13080 > Project: Cassandra > Issue Type: Improvement > Components: Core >Reporter: Dikang Gu >Assignee: Dikang Gu > Fix For: 3.12 > > > There are couple reasons I think we should use the new token allocation for > non bootstrap case as well. > 1. In some cases, We want to bring up nodes, but do not need to stream any > data to the new nodes. So we want to allocate correct tokens, and skip the > JOIN state, which should avoid triggering pending range calculation on other > nodes as well. On use case is when we bring up a new DC. > 2. We can unify the token allocation code path for both bootstrap and > non-bootstrap use case. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-10825) OverloadedException is untested
[ https://issues.apache.org/jira/browse/CASSANDRA-10825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795683#comment-15795683 ] Aleksey Yeschenko edited comment on CASSANDRA-10825 at 1/3/17 6:15 PM: --- Scratch that previous comment. It's just the only explanation that comes to mind, but cannot be right. Overall, though, I don't see any changes to the logic that would address the issue. Is all you've done basically replace {{AtomicLong}} with {{Counter}} plus some unrelated minor refactorings? was (Author: iamaleksey): You are calling {{load}} with a new instance of autoboxed {{Integer}} every time, which is why the increments seem 'lost'. In reality after two increment calls and one load call you now have 3 instanced of {{AtomicInteger}} in the cache, two of 1 and one of 0. > OverloadedException is untested > --- > > Key: CASSANDRA-10825 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10825 > Project: Cassandra > Issue Type: Bug > Components: Local Write-Read Paths >Reporter: Ariel Weisberg >Assignee: Edward Capriolo > Attachments: jmx-hint.png > > > If you grep test/src and cassandra-dtest you will find that the string > OverloadedException doesn't appear anywhere. > In CASSANDRA-10477 it was found that there were cases where Paxos should > back-pressure and throw OverloadedException but didn't. > If OverloadedException is used for functional purposes then we should test > that it is thrown under expected conditions. If there are behaviors driven by > catching or tracking OverloadedException we should test those as well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13074) DynamicEndpointSnitch frequently no-ops through early exit in multi-datacenter situations
[ https://issues.apache.org/jira/browse/CASSANDRA-13074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] T Jake Luciani updated CASSANDRA-13074: --- Resolution: Fixed Fix Version/s: (was: 4.x) (was: 3.0.x) (was: 2.2.x) (was: 3.x) 3.10 3.0.11 2.2.9 Status: Resolved (was: Patch Available) Great thanks! +1 committed {{e4f732536af9d81dd012d7d498b884cd7c8c0b48}} > DynamicEndpointSnitch frequently no-ops through early exit in > multi-datacenter situations > - > > Key: CASSANDRA-13074 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13074 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Joel Knighton >Assignee: Joel Knighton > Fix For: 2.2.9, 3.0.11, 3.10 > > > The DynamicEndpointSnitch attempts to use timings from nodes to route reads > to better performing nodes. > In a multi-datacenter situation, timings will likely be empty for nodes > outside of the local datacenter, as you'll frequently only be doing > local_quorum reads (or a lower consistency level). In this case, the DES > exits early and returns the subsnitch ordering. This means poorly performing > replicas will never be avoided, no matter how degraded they are. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[12/15] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11
Merge branch 'cassandra-3.0' into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/68f7ce44 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/68f7ce44 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/68f7ce44 Branch: refs/heads/cassandra-3.11 Commit: 68f7ce440e3ddf1dc67a508bbc1fb8db4a60a027 Parents: 84b1725 617bd23 Author: T Jake LucianiAuthored: Tue Jan 3 13:03:49 2017 -0500 Committer: T Jake Luciani Committed: Tue Jan 3 13:03:49 2017 -0500 -- CHANGES.txt | 3 +++ .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 8 3 files changed, 12 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/68f7ce44/CHANGES.txt -- diff --cc CHANGES.txt index 0c215a2,36c88c9..64314dc --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -127,12 -16,31 +127,14 @@@ Merged from 3.0 * AnticompactionRequestSerializer serializedSize is incorrect (CASSANDRA-12934) * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535) * Reenable HeapPool (CASSANDRA-12900) -Merged from 2.2: - * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) - * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) - * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) - * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) - * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980) - * Do not specify local address on outgoing connection when listen_on_broadcast_address is set (CASSANDRA-12673) - * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935) - * cqlsh: fix DESC TYPES errors (CASSANDRA-12914) - * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899) - * Avoid blocking gossip during pending range calculation (CASSANDRA-12281) -Merged from 2.1: - * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) - - -3.0.10 + * Disallow offheap_buffers memtable allocation (CASSANDRA-11039) + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283) * Pass root cause to CorruptBlockException when uncompression failed (CASSANDRA-12889) - * Fix partition count log during compaction (CASSANDRA-12184) * Batch with multiple conditional updates for the same partition causes AssertionError (CASSANDRA-12867) * Make AbstractReplicationStrategy extendable from outside its package (CASSANDRA-12788) - * Fix CommitLogTest.testDeleteIfNotDirty (CASSANDRA-12854) * Don't tell users to turn off consistent rangemovements during rebuild. (CASSANDRA-12296) - * Avoid deadlock due to materialized view lock contention (CASSANDRA-12689) + * Fix CommitLogTest.testDeleteIfNotDirty (CASSANDRA-12854) + * Avoid deadlock due to MV lock contention (CASSANDRA-12689) * Fix for KeyCacheCqlTest flakiness (CASSANDRA-12801) * Include SSTable filename in compacting large row message (CASSANDRA-12384) * Fix potential socket leak (CASSANDRA-12329, CASSANDRA-12330) @@@ -173,14 -67,6 +175,15 @@@ * Correct log message for statistics of offheap memtable flush (CASSANDRA-12776) * Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545) Merged from 2.2: ++ * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) + * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) + * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) + * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) + * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980) + * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935) + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914) + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899) + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281) * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792) * Fail repair if participant dies during sync or anticompaction (CASSANDRA-12901) * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863) http://git-wip-us.apache.org/repos/asf/cassandra/blob/68f7ce44/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java --
[14/15] cassandra git commit: Merge branch 'cassandra-3.11' into cassandra-3.X
Merge branch 'cassandra-3.11' into cassandra-3.X Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/917d13f0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/917d13f0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/917d13f0 Branch: refs/heads/trunk Commit: 917d13f00ff27d93ab50eeef30153f33ab98393f Parents: 4aa09eb 68f7ce4 Author: T Jake LucianiAuthored: Tue Jan 3 13:04:32 2017 -0500 Committer: T Jake Luciani Committed: Tue Jan 3 13:04:32 2017 -0500 -- CHANGES.txt | 3 +++ .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 8 3 files changed, 12 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/917d13f0/CHANGES.txt --
[04/15] cassandra git commit: Don't return early from DynamicEndpointSnitch when null scores are encountered
Don't return early from DynamicEndpointSnitch when null scores are encountered Patch by Joel Knighton; reviewed by tjake for CASSANDRA-13074 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e4f73253 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e4f73253 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e4f73253 Branch: refs/heads/cassandra-3.11 Commit: e4f732536af9d81dd012d7d498b884cd7c8c0b48 Parents: f4fd092 Author: Joel KnightonAuthored: Wed Dec 21 15:15:40 2016 -0600 Committer: T Jake Luciani Committed: Tue Jan 3 12:50:18 2017 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 9 - 3 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 8a7ae42..d31ffc8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.9 + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java -- diff --git a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java index 6280dc2..9c0c57e 100644 --- a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java +++ b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java @@ -185,7 +185,7 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa { Double score = scores.get(inet); if (score == null) -return; +continue; subsnitchOrderedScores.add(score); } @@ -215,13 +215,11 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa if (scored1 == null) { scored1 = 0.0; -receiveTiming(a1, 0); } if (scored2 == null) { scored2 = 0.0; -receiveTiming(a2, 0); } if (scored1.equals(scored2)) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java -- diff --git a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java index 100cd25..d27edbf 100644 --- a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java +++ b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java @@ -33,7 +33,6 @@ import static org.junit.Assert.assertEquals; public class DynamicEndpointSnitchTest { - private static void setScores(DynamicEndpointSnitch dsnitch, int rounds, List hosts, Integer... scores) throws InterruptedException { for (int round = 0; round < rounds; round++) @@ -55,6 +54,7 @@ public class DynamicEndpointSnitchTest InetAddress host1 = InetAddress.getByName("127.0.0.2"); InetAddress host2 = InetAddress.getByName("127.0.0.3"); InetAddress host3 = InetAddress.getByName("127.0.0.4"); +InetAddress host4 = InetAddress.getByName("127.0.0.5"); List hosts = Arrays.asList(host1, host2, host3); // first, make all hosts equal @@ -88,5 +88,12 @@ public class DynamicEndpointSnitchTest setScores(dsnitch, 20, hosts, 10, 70, 20); order = Arrays.asList(host1, host3, host2); assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3))); + +order = Arrays.asList(host4, host1, host3, host2); +assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3, host4))); + +setScores(dsnitch, 20, hosts, 10, 10, 10); +order = Arrays.asList(host1, host2, host3, host4); +assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3, host4))); } }
[02/15] cassandra git commit: Don't return early from DynamicEndpointSnitch when null scores are encountered
Don't return early from DynamicEndpointSnitch when null scores are encountered Patch by Joel Knighton; reviewed by tjake for CASSANDRA-13074 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e4f73253 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e4f73253 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e4f73253 Branch: refs/heads/cassandra-3.0 Commit: e4f732536af9d81dd012d7d498b884cd7c8c0b48 Parents: f4fd092 Author: Joel KnightonAuthored: Wed Dec 21 15:15:40 2016 -0600 Committer: T Jake Luciani Committed: Tue Jan 3 12:50:18 2017 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 9 - 3 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 8a7ae42..d31ffc8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.9 + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java -- diff --git a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java index 6280dc2..9c0c57e 100644 --- a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java +++ b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java @@ -185,7 +185,7 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa { Double score = scores.get(inet); if (score == null) -return; +continue; subsnitchOrderedScores.add(score); } @@ -215,13 +215,11 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa if (scored1 == null) { scored1 = 0.0; -receiveTiming(a1, 0); } if (scored2 == null) { scored2 = 0.0; -receiveTiming(a2, 0); } if (scored1.equals(scored2)) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java -- diff --git a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java index 100cd25..d27edbf 100644 --- a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java +++ b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java @@ -33,7 +33,6 @@ import static org.junit.Assert.assertEquals; public class DynamicEndpointSnitchTest { - private static void setScores(DynamicEndpointSnitch dsnitch, int rounds, List hosts, Integer... scores) throws InterruptedException { for (int round = 0; round < rounds; round++) @@ -55,6 +54,7 @@ public class DynamicEndpointSnitchTest InetAddress host1 = InetAddress.getByName("127.0.0.2"); InetAddress host2 = InetAddress.getByName("127.0.0.3"); InetAddress host3 = InetAddress.getByName("127.0.0.4"); +InetAddress host4 = InetAddress.getByName("127.0.0.5"); List hosts = Arrays.asList(host1, host2, host3); // first, make all hosts equal @@ -88,5 +88,12 @@ public class DynamicEndpointSnitchTest setScores(dsnitch, 20, hosts, 10, 70, 20); order = Arrays.asList(host1, host3, host2); assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3))); + +order = Arrays.asList(host4, host1, host3, host2); +assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3, host4))); + +setScores(dsnitch, 20, hosts, 10, 10, 10); +order = Arrays.asList(host1, host2, host3, host4); +assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3, host4))); } }
[11/15] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11
Merge branch 'cassandra-3.0' into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/68f7ce44 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/68f7ce44 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/68f7ce44 Branch: refs/heads/cassandra-3.X Commit: 68f7ce440e3ddf1dc67a508bbc1fb8db4a60a027 Parents: 84b1725 617bd23 Author: T Jake LucianiAuthored: Tue Jan 3 13:03:49 2017 -0500 Committer: T Jake Luciani Committed: Tue Jan 3 13:03:49 2017 -0500 -- CHANGES.txt | 3 +++ .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 8 3 files changed, 12 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/68f7ce44/CHANGES.txt -- diff --cc CHANGES.txt index 0c215a2,36c88c9..64314dc --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -127,12 -16,31 +127,14 @@@ Merged from 3.0 * AnticompactionRequestSerializer serializedSize is incorrect (CASSANDRA-12934) * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535) * Reenable HeapPool (CASSANDRA-12900) -Merged from 2.2: - * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) - * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) - * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) - * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) - * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980) - * Do not specify local address on outgoing connection when listen_on_broadcast_address is set (CASSANDRA-12673) - * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935) - * cqlsh: fix DESC TYPES errors (CASSANDRA-12914) - * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899) - * Avoid blocking gossip during pending range calculation (CASSANDRA-12281) -Merged from 2.1: - * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) - - -3.0.10 + * Disallow offheap_buffers memtable allocation (CASSANDRA-11039) + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283) * Pass root cause to CorruptBlockException when uncompression failed (CASSANDRA-12889) - * Fix partition count log during compaction (CASSANDRA-12184) * Batch with multiple conditional updates for the same partition causes AssertionError (CASSANDRA-12867) * Make AbstractReplicationStrategy extendable from outside its package (CASSANDRA-12788) - * Fix CommitLogTest.testDeleteIfNotDirty (CASSANDRA-12854) * Don't tell users to turn off consistent rangemovements during rebuild. (CASSANDRA-12296) - * Avoid deadlock due to materialized view lock contention (CASSANDRA-12689) + * Fix CommitLogTest.testDeleteIfNotDirty (CASSANDRA-12854) + * Avoid deadlock due to MV lock contention (CASSANDRA-12689) * Fix for KeyCacheCqlTest flakiness (CASSANDRA-12801) * Include SSTable filename in compacting large row message (CASSANDRA-12384) * Fix potential socket leak (CASSANDRA-12329, CASSANDRA-12330) @@@ -173,14 -67,6 +175,15 @@@ * Correct log message for statistics of offheap memtable flush (CASSANDRA-12776) * Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545) Merged from 2.2: ++ * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) + * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) + * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) + * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) + * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980) + * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935) + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914) + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899) + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281) * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792) * Fail repair if participant dies during sync or anticompaction (CASSANDRA-12901) * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863) http://git-wip-us.apache.org/repos/asf/cassandra/blob/68f7ce44/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java --
[03/15] cassandra git commit: Don't return early from DynamicEndpointSnitch when null scores are encountered
Don't return early from DynamicEndpointSnitch when null scores are encountered Patch by Joel Knighton; reviewed by tjake for CASSANDRA-13074 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e4f73253 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e4f73253 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e4f73253 Branch: refs/heads/trunk Commit: e4f732536af9d81dd012d7d498b884cd7c8c0b48 Parents: f4fd092 Author: Joel KnightonAuthored: Wed Dec 21 15:15:40 2016 -0600 Committer: T Jake Luciani Committed: Tue Jan 3 12:50:18 2017 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 9 - 3 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 8a7ae42..d31ffc8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.9 + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java -- diff --git a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java index 6280dc2..9c0c57e 100644 --- a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java +++ b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java @@ -185,7 +185,7 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa { Double score = scores.get(inet); if (score == null) -return; +continue; subsnitchOrderedScores.add(score); } @@ -215,13 +215,11 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa if (scored1 == null) { scored1 = 0.0; -receiveTiming(a1, 0); } if (scored2 == null) { scored2 = 0.0; -receiveTiming(a2, 0); } if (scored1.equals(scored2)) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java -- diff --git a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java index 100cd25..d27edbf 100644 --- a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java +++ b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java @@ -33,7 +33,6 @@ import static org.junit.Assert.assertEquals; public class DynamicEndpointSnitchTest { - private static void setScores(DynamicEndpointSnitch dsnitch, int rounds, List hosts, Integer... scores) throws InterruptedException { for (int round = 0; round < rounds; round++) @@ -55,6 +54,7 @@ public class DynamicEndpointSnitchTest InetAddress host1 = InetAddress.getByName("127.0.0.2"); InetAddress host2 = InetAddress.getByName("127.0.0.3"); InetAddress host3 = InetAddress.getByName("127.0.0.4"); +InetAddress host4 = InetAddress.getByName("127.0.0.5"); List hosts = Arrays.asList(host1, host2, host3); // first, make all hosts equal @@ -88,5 +88,12 @@ public class DynamicEndpointSnitchTest setScores(dsnitch, 20, hosts, 10, 70, 20); order = Arrays.asList(host1, host3, host2); assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3))); + +order = Arrays.asList(host4, host1, host3, host2); +assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3, host4))); + +setScores(dsnitch, 20, hosts, 10, 10, 10); +order = Arrays.asList(host1, host2, host3, host4); +assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3, host4))); } }
[08/15] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
Merge branch 'cassandra-2.2' into cassandra-3.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/617bd23e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/617bd23e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/617bd23e Branch: refs/heads/cassandra-3.11 Commit: 617bd23e8b55a190774db7053d85f6067aedd8ba Parents: b0f85b9 e4f7325 Author: T Jake LucianiAuthored: Tue Jan 3 12:55:53 2017 -0500 Committer: T Jake Luciani Committed: Tue Jan 3 12:55:53 2017 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 9 - 3 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/617bd23e/CHANGES.txt -- diff --cc CHANGES.txt index 528ed65,d31ffc8..36c88c9 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,22 -1,5 +1,23 @@@ -2.2.9 +3.0.11 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620) + * Add parent repair session id to anticompaction log message (CASSANDRA-12186) + * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905) + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829) + * Mark MVs as built after successful bootstrap (CASSANDRA-12984) + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME (CASSANDRA-13040) + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021) + * Thread local pools never cleaned up (CASSANDRA-13033) + * Set RPC_READY to false when draining or if a node is marked as shutdown (CASSANDRA-12781) + * CQL often queries static columns unnecessarily (CASSANDRA-12768) + * Make sure sstables only get committed when it's safe to discard commit log records (CASSANDRA-12956) + * Reject default_time_to_live option when creating or altering MVs (CASSANDRA-12868) + * Nodetool should use a more sane max heap size (CASSANDRA-12739) + * LocalToken ensures token values are cloned on heap (CASSANDRA-12651) + * AnticompactionRequestSerializer serializedSize is incorrect (CASSANDRA-12934) + * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535) + * Reenable HeapPool (CASSANDRA-12900) +Merged from 2.2: + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) http://git-wip-us.apache.org/repos/asf/cassandra/blob/617bd23e/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java --
[09/15] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
Merge branch 'cassandra-2.2' into cassandra-3.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/617bd23e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/617bd23e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/617bd23e Branch: refs/heads/cassandra-3.X Commit: 617bd23e8b55a190774db7053d85f6067aedd8ba Parents: b0f85b9 e4f7325 Author: T Jake LucianiAuthored: Tue Jan 3 12:55:53 2017 -0500 Committer: T Jake Luciani Committed: Tue Jan 3 12:55:53 2017 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 9 - 3 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/617bd23e/CHANGES.txt -- diff --cc CHANGES.txt index 528ed65,d31ffc8..36c88c9 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,22 -1,5 +1,23 @@@ -2.2.9 +3.0.11 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620) + * Add parent repair session id to anticompaction log message (CASSANDRA-12186) + * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905) + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829) + * Mark MVs as built after successful bootstrap (CASSANDRA-12984) + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME (CASSANDRA-13040) + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021) + * Thread local pools never cleaned up (CASSANDRA-13033) + * Set RPC_READY to false when draining or if a node is marked as shutdown (CASSANDRA-12781) + * CQL often queries static columns unnecessarily (CASSANDRA-12768) + * Make sure sstables only get committed when it's safe to discard commit log records (CASSANDRA-12956) + * Reject default_time_to_live option when creating or altering MVs (CASSANDRA-12868) + * Nodetool should use a more sane max heap size (CASSANDRA-12739) + * LocalToken ensures token values are cloned on heap (CASSANDRA-12651) + * AnticompactionRequestSerializer serializedSize is incorrect (CASSANDRA-12934) + * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535) + * Reenable HeapPool (CASSANDRA-12900) +Merged from 2.2: + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) http://git-wip-us.apache.org/repos/asf/cassandra/blob/617bd23e/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java --
[jira] [Commented] (CASSANDRA-10825) OverloadedException is untested
[ https://issues.apache.org/jira/browse/CASSANDRA-10825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795683#comment-15795683 ] Aleksey Yeschenko commented on CASSANDRA-10825: --- You are calling {{load}} with a new instance of autoboxed {{Integer}} every time, which is why the increments seem 'lost'. In reality after two increment calls and one load call you now have 3 instanced of {{AtomicInteger}} in the cache, two of 1 and one of 0. > OverloadedException is untested > --- > > Key: CASSANDRA-10825 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10825 > Project: Cassandra > Issue Type: Bug > Components: Local Write-Read Paths >Reporter: Ariel Weisberg >Assignee: Edward Capriolo > Attachments: jmx-hint.png > > > If you grep test/src and cassandra-dtest you will find that the string > OverloadedException doesn't appear anywhere. > In CASSANDRA-10477 it was found that there were cases where Paxos should > back-pressure and throw OverloadedException but didn't. > If OverloadedException is used for functional purposes then we should test > that it is thrown under expected conditions. If there are behaviors driven by > catching or tracking OverloadedException we should test those as well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[07/15] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
Merge branch 'cassandra-2.2' into cassandra-3.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/617bd23e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/617bd23e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/617bd23e Branch: refs/heads/cassandra-3.0 Commit: 617bd23e8b55a190774db7053d85f6067aedd8ba Parents: b0f85b9 e4f7325 Author: T Jake LucianiAuthored: Tue Jan 3 12:55:53 2017 -0500 Committer: T Jake Luciani Committed: Tue Jan 3 12:55:53 2017 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 9 - 3 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/617bd23e/CHANGES.txt -- diff --cc CHANGES.txt index 528ed65,d31ffc8..36c88c9 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,22 -1,5 +1,23 @@@ -2.2.9 +3.0.11 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620) + * Add parent repair session id to anticompaction log message (CASSANDRA-12186) + * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905) + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829) + * Mark MVs as built after successful bootstrap (CASSANDRA-12984) + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME (CASSANDRA-13040) + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021) + * Thread local pools never cleaned up (CASSANDRA-13033) + * Set RPC_READY to false when draining or if a node is marked as shutdown (CASSANDRA-12781) + * CQL often queries static columns unnecessarily (CASSANDRA-12768) + * Make sure sstables only get committed when it's safe to discard commit log records (CASSANDRA-12956) + * Reject default_time_to_live option when creating or altering MVs (CASSANDRA-12868) + * Nodetool should use a more sane max heap size (CASSANDRA-12739) + * LocalToken ensures token values are cloned on heap (CASSANDRA-12651) + * AnticompactionRequestSerializer serializedSize is incorrect (CASSANDRA-12934) + * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535) + * Reenable HeapPool (CASSANDRA-12900) +Merged from 2.2: + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) http://git-wip-us.apache.org/repos/asf/cassandra/blob/617bd23e/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java --
[05/15] cassandra git commit: Don't return early from DynamicEndpointSnitch when null scores are encountered
Don't return early from DynamicEndpointSnitch when null scores are encountered Patch by Joel Knighton; reviewed by tjake for CASSANDRA-13074 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e4f73253 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e4f73253 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e4f73253 Branch: refs/heads/cassandra-3.X Commit: e4f732536af9d81dd012d7d498b884cd7c8c0b48 Parents: f4fd092 Author: Joel KnightonAuthored: Wed Dec 21 15:15:40 2016 -0600 Committer: T Jake Luciani Committed: Tue Jan 3 12:50:18 2017 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 9 - 3 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 8a7ae42..d31ffc8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.9 + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java -- diff --git a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java index 6280dc2..9c0c57e 100644 --- a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java +++ b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java @@ -185,7 +185,7 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa { Double score = scores.get(inet); if (score == null) -return; +continue; subsnitchOrderedScores.add(score); } @@ -215,13 +215,11 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa if (scored1 == null) { scored1 = 0.0; -receiveTiming(a1, 0); } if (scored2 == null) { scored2 = 0.0; -receiveTiming(a2, 0); } if (scored1.equals(scored2)) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java -- diff --git a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java index 100cd25..d27edbf 100644 --- a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java +++ b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java @@ -33,7 +33,6 @@ import static org.junit.Assert.assertEquals; public class DynamicEndpointSnitchTest { - private static void setScores(DynamicEndpointSnitch dsnitch, int rounds, List hosts, Integer... scores) throws InterruptedException { for (int round = 0; round < rounds; round++) @@ -55,6 +54,7 @@ public class DynamicEndpointSnitchTest InetAddress host1 = InetAddress.getByName("127.0.0.2"); InetAddress host2 = InetAddress.getByName("127.0.0.3"); InetAddress host3 = InetAddress.getByName("127.0.0.4"); +InetAddress host4 = InetAddress.getByName("127.0.0.5"); List hosts = Arrays.asList(host1, host2, host3); // first, make all hosts equal @@ -88,5 +88,12 @@ public class DynamicEndpointSnitchTest setScores(dsnitch, 20, hosts, 10, 70, 20); order = Arrays.asList(host1, host3, host2); assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3))); + +order = Arrays.asList(host4, host1, host3, host2); +assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3, host4))); + +setScores(dsnitch, 20, hosts, 10, 10, 10); +order = Arrays.asList(host1, host2, host3, host4); +assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3, host4))); } }
[06/15] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
Merge branch 'cassandra-2.2' into cassandra-3.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/617bd23e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/617bd23e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/617bd23e Branch: refs/heads/trunk Commit: 617bd23e8b55a190774db7053d85f6067aedd8ba Parents: b0f85b9 e4f7325 Author: T Jake LucianiAuthored: Tue Jan 3 12:55:53 2017 -0500 Committer: T Jake Luciani Committed: Tue Jan 3 12:55:53 2017 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 9 - 3 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/617bd23e/CHANGES.txt -- diff --cc CHANGES.txt index 528ed65,d31ffc8..36c88c9 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,22 -1,5 +1,23 @@@ -2.2.9 +3.0.11 + * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620) + * Add parent repair session id to anticompaction log message (CASSANDRA-12186) + * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905) + * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829) + * Mark MVs as built after successful bootstrap (CASSANDRA-12984) + * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME (CASSANDRA-13040) + * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021) + * Thread local pools never cleaned up (CASSANDRA-13033) + * Set RPC_READY to false when draining or if a node is marked as shutdown (CASSANDRA-12781) + * CQL often queries static columns unnecessarily (CASSANDRA-12768) + * Make sure sstables only get committed when it's safe to discard commit log records (CASSANDRA-12956) + * Reject default_time_to_live option when creating or altering MVs (CASSANDRA-12868) + * Nodetool should use a more sane max heap size (CASSANDRA-12739) + * LocalToken ensures token values are cloned on heap (CASSANDRA-12651) + * AnticompactionRequestSerializer serializedSize is incorrect (CASSANDRA-12934) + * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535) + * Reenable HeapPool (CASSANDRA-12900) +Merged from 2.2: + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) http://git-wip-us.apache.org/repos/asf/cassandra/blob/617bd23e/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java --
[13/15] cassandra git commit: Merge branch 'cassandra-3.11' into cassandra-3.X
Merge branch 'cassandra-3.11' into cassandra-3.X Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/917d13f0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/917d13f0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/917d13f0 Branch: refs/heads/cassandra-3.X Commit: 917d13f00ff27d93ab50eeef30153f33ab98393f Parents: 4aa09eb 68f7ce4 Author: T Jake LucianiAuthored: Tue Jan 3 13:04:32 2017 -0500 Committer: T Jake Luciani Committed: Tue Jan 3 13:04:32 2017 -0500 -- CHANGES.txt | 3 +++ .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 8 3 files changed, 12 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/917d13f0/CHANGES.txt --
[01/15] cassandra git commit: Don't return early from DynamicEndpointSnitch when null scores are encountered
Repository: cassandra Updated Branches: refs/heads/cassandra-2.2 f4fd0928e -> e4f732536 refs/heads/cassandra-3.0 b0f85b96d -> 617bd23e8 refs/heads/cassandra-3.11 84b1725fb -> 68f7ce440 refs/heads/cassandra-3.X 4aa09eb7a -> 917d13f00 refs/heads/trunk c607d7641 -> 87b1bb87a Don't return early from DynamicEndpointSnitch when null scores are encountered Patch by Joel Knighton; reviewed by tjake for CASSANDRA-13074 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e4f73253 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e4f73253 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e4f73253 Branch: refs/heads/cassandra-2.2 Commit: e4f732536af9d81dd012d7d498b884cd7c8c0b48 Parents: f4fd092 Author: Joel KnightonAuthored: Wed Dec 21 15:15:40 2016 -0600 Committer: T Jake Luciani Committed: Tue Jan 3 12:50:18 2017 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 9 - 3 files changed, 10 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 8a7ae42..d31ffc8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.9 + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java -- diff --git a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java index 6280dc2..9c0c57e 100644 --- a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java +++ b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java @@ -185,7 +185,7 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa { Double score = scores.get(inet); if (score == null) -return; +continue; subsnitchOrderedScores.add(score); } @@ -215,13 +215,11 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements ILa if (scored1 == null) { scored1 = 0.0; -receiveTiming(a1, 0); } if (scored2 == null) { scored2 = 0.0; -receiveTiming(a2, 0); } if (scored1.equals(scored2)) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e4f73253/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java -- diff --git a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java index 100cd25..d27edbf 100644 --- a/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java +++ b/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java @@ -33,7 +33,6 @@ import static org.junit.Assert.assertEquals; public class DynamicEndpointSnitchTest { - private static void setScores(DynamicEndpointSnitch dsnitch, int rounds, List hosts, Integer... scores) throws InterruptedException { for (int round = 0; round < rounds; round++) @@ -55,6 +54,7 @@ public class DynamicEndpointSnitchTest InetAddress host1 = InetAddress.getByName("127.0.0.2"); InetAddress host2 = InetAddress.getByName("127.0.0.3"); InetAddress host3 = InetAddress.getByName("127.0.0.4"); +InetAddress host4 = InetAddress.getByName("127.0.0.5"); List hosts = Arrays.asList(host1, host2, host3); // first, make all hosts equal @@ -88,5 +88,12 @@ public class DynamicEndpointSnitchTest setScores(dsnitch, 20, hosts, 10, 70, 20); order = Arrays.asList(host1, host3, host2); assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3))); + +order = Arrays.asList(host4, host1, host3, host2); +assertEquals(order, dsnitch.getSortedListByProximity(self, Arrays.asList(host1, host2, host3, host4))); + +setScores(dsnitch, 20, hosts, 10, 10, 10); +order =
[15/15] cassandra git commit: Merge branch 'cassandra-3.X' into trunk
Merge branch 'cassandra-3.X' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/87b1bb87 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/87b1bb87 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/87b1bb87 Branch: refs/heads/trunk Commit: 87b1bb87a42bc64f5fcb3eef8a4bdba766187545 Parents: c607d76 917d13f Author: T Jake LucianiAuthored: Tue Jan 3 13:04:52 2017 -0500 Committer: T Jake Luciani Committed: Tue Jan 3 13:04:52 2017 -0500 -- CHANGES.txt | 3 +++ .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 8 3 files changed, 12 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/87b1bb87/CHANGES.txt --
[10/15] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.11
Merge branch 'cassandra-3.0' into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/68f7ce44 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/68f7ce44 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/68f7ce44 Branch: refs/heads/trunk Commit: 68f7ce440e3ddf1dc67a508bbc1fb8db4a60a027 Parents: 84b1725 617bd23 Author: T Jake LucianiAuthored: Tue Jan 3 13:03:49 2017 -0500 Committer: T Jake Luciani Committed: Tue Jan 3 13:03:49 2017 -0500 -- CHANGES.txt | 3 +++ .../org/apache/cassandra/locator/DynamicEndpointSnitch.java | 4 +--- .../apache/cassandra/locator/DynamicEndpointSnitchTest.java | 8 3 files changed, 12 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/68f7ce44/CHANGES.txt -- diff --cc CHANGES.txt index 0c215a2,36c88c9..64314dc --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -127,12 -16,31 +127,14 @@@ Merged from 3.0 * AnticompactionRequestSerializer serializedSize is incorrect (CASSANDRA-12934) * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535) * Reenable HeapPool (CASSANDRA-12900) -Merged from 2.2: - * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) - * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) - * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) - * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) - * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980) - * Do not specify local address on outgoing connection when listen_on_broadcast_address is set (CASSANDRA-12673) - * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935) - * cqlsh: fix DESC TYPES errors (CASSANDRA-12914) - * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899) - * Avoid blocking gossip during pending range calculation (CASSANDRA-12281) -Merged from 2.1: - * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) - - -3.0.10 + * Disallow offheap_buffers memtable allocation (CASSANDRA-11039) + * Fix CommitLogSegmentManagerTest (CASSANDRA-12283) * Pass root cause to CorruptBlockException when uncompression failed (CASSANDRA-12889) - * Fix partition count log during compaction (CASSANDRA-12184) * Batch with multiple conditional updates for the same partition causes AssertionError (CASSANDRA-12867) * Make AbstractReplicationStrategy extendable from outside its package (CASSANDRA-12788) - * Fix CommitLogTest.testDeleteIfNotDirty (CASSANDRA-12854) * Don't tell users to turn off consistent rangemovements during rebuild. (CASSANDRA-12296) - * Avoid deadlock due to materialized view lock contention (CASSANDRA-12689) + * Fix CommitLogTest.testDeleteIfNotDirty (CASSANDRA-12854) + * Avoid deadlock due to MV lock contention (CASSANDRA-12689) * Fix for KeyCacheCqlTest flakiness (CASSANDRA-12801) * Include SSTable filename in compacting large row message (CASSANDRA-12384) * Fix potential socket leak (CASSANDRA-12329, CASSANDRA-12330) @@@ -173,14 -67,6 +175,15 @@@ * Correct log message for statistics of offheap memtable flush (CASSANDRA-12776) * Explicitly set locale for string validation (CASSANDRA-12541,CASSANDRA-12542,CASSANDRA-12543,CASSANDRA-12545) Merged from 2.2: ++ * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) + * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) + * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) + * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) + * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980) + * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935) + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914) + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899) + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281) * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792) * Fail repair if participant dies during sync or anticompaction (CASSANDRA-12901) * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863) http://git-wip-us.apache.org/repos/asf/cassandra/blob/68f7ce44/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java --
[jira] [Updated] (CASSANDRA-12171) counter mismatch during rolling upgrade from 2.2 to 3.0
[ https://issues.apache.org/jira/browse/CASSANDRA-12171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-12171: -- Assignee: (was: Aleksey Yeschenko) > counter mismatch during rolling upgrade from 2.2 to 3.0 > --- > > Key: CASSANDRA-12171 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12171 > Project: Cassandra > Issue Type: Bug >Reporter: Russ Hatch > > This may occur on other versions, but 3.0 is where I observed it recently. > N=RF=3, counter writes at quorum, reads at quorum. > This is being seen on some upgrade tests I'm currently repairing here: > https://github.com/riptano/cassandra-dtest/tree/upgrade_counters_fix (this > branch is to resolve an issue where counters were not being properly tested > during rolling upgrade tests). > The test runs a continuous counter incrementing process, as well as a > continuous counter checking process. Once a counter value has been verified, > the test code makes it eligible to be incremented again. > The test is encountering the problem when trying to check an expected counter > value and not matching expectations, for example: > {noformat} > Traceback (most recent call last): > File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in > _bootstrap > self.run() > File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run > self._target(*self._args, **self._kwargs) > File > "/home/rhatch/git/cstar/cassandra-dtest/upgrade_tests/upgrade_through_versions_test.py", > line 210, in counter_checker > tester.assertEqual(expected_count, actual_count) > File "/usr/lib/python2.7/unittest/case.py", line 513, in assertEqual > assertion_func(first, second, msg=msg) > File "/usr/lib/python2.7/unittest/case.py", line 506, in _baseAssertEqual > raise self.failureException(msg) > AssertionError: 1 != 2 > ERROR > {noformat} > To check if something else could be going on, I did an experiment where I > changed the test to not upgrade nodes (just drain, stop, start) and the > mismatch didn't occur in several attempts. So it appears something about > upgrading is possibly the culprit. > To run the test and repro locally: > {noformat} > grab my dtest branch at > https://github.com/riptano/cassandra-dtest/tree/upgrade_counters_fix > export UPGRADE_TEST_RUN=true > nosetests -v > upgrade_tests/upgrade_through_versions_test.py:TestUpgrade_current_2_2_x_To_indev_3_0_x.rolling_upgrade_test > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-11634) Add write timestamp to trace
[ https://issues.apache.org/jira/browse/CASSANDRA-11634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795645#comment-15795645 ] Aleksey Yeschenko commented on CASSANDRA-11634: --- My primary issue is having a tracing call in what should be a side-effect free, idempotent getter. The right spot for the trace call should be higher up in the call hierarchy, closer to modification statements' {{execute}} methods. Maybe {{ModificationStatement.addUpdates()}}. This would require the origin of the timestamp to be hoisted in higher level parameters object, among other changes. Unfortunately I don't myself have time to write a patch for this myself; but putting tracing call in a getter is not right. > Add write timestamp to trace > > > Key: CASSANDRA-11634 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11634 > Project: Cassandra > Issue Type: Improvement > Components: Observability >Reporter: Christopher Batey >Assignee: Christopher Batey >Priority: Minor > Fix For: 3.x > > Attachments: 0001-Add-trace-message-for-write-timestamp.patch > > > Diagnosing issues with clock drift would be easier if trace had the mutation > timestamp. I'll add a patch for this soon. > Patch attached or at: > https://github.com/chbatey/cassandra-1/tree/trace-write-timestamp -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-11634) Add write timestamp to trace
[ https://issues.apache.org/jira/browse/CASSANDRA-11634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-11634: -- Status: Open (was: Patch Available) > Add write timestamp to trace > > > Key: CASSANDRA-11634 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11634 > Project: Cassandra > Issue Type: Improvement > Components: Observability >Reporter: Christopher Batey >Assignee: Christopher Batey >Priority: Minor > Fix For: 3.x > > Attachments: 0001-Add-trace-message-for-write-timestamp.patch > > > Diagnosing issues with clock drift would be easier if trace had the mutation > timestamp. I'll add a patch for this soon. > Patch attached or at: > https://github.com/chbatey/cassandra-1/tree/trace-write-timestamp -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-11634) Add write timestamp to trace
[ https://issues.apache.org/jira/browse/CASSANDRA-11634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-11634: -- Reviewer: (was: Aleksey Yeschenko) > Add write timestamp to trace > > > Key: CASSANDRA-11634 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11634 > Project: Cassandra > Issue Type: Improvement > Components: Observability >Reporter: Christopher Batey >Assignee: Christopher Batey >Priority: Minor > Fix For: 3.x > > Attachments: 0001-Add-trace-message-for-write-timestamp.patch > > > Diagnosing issues with clock drift would be easier if trace had the mutation > timestamp. I'll add a patch for this soon. > Patch attached or at: > https://github.com/chbatey/cassandra-1/tree/trace-write-timestamp -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13074) DynamicEndpointSnitch frequently no-ops through early exit in multi-datacenter situations
[ https://issues.apache.org/jira/browse/CASSANDRA-13074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795527#comment-15795527 ] Joel Knighton commented on CASSANDRA-13074: --- [~tjake] - A dtest is a great idea. I've PRed a test to [riptano/cassandra-dtest|https://github.com/riptano/cassandra-dtest/pull/1416]. > DynamicEndpointSnitch frequently no-ops through early exit in > multi-datacenter situations > - > > Key: CASSANDRA-13074 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13074 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Joel Knighton >Assignee: Joel Knighton > Fix For: 2.2.x, 3.0.x, 3.x, 4.x > > > The DynamicEndpointSnitch attempts to use timings from nodes to route reads > to better performing nodes. > In a multi-datacenter situation, timings will likely be empty for nodes > outside of the local datacenter, as you'll frequently only be doing > local_quorum reads (or a lower consistency level). In this case, the DES > exits early and returns the subsnitch ordering. This means poorly performing > replicas will never be avoided, no matter how degraded they are. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13031) Speed-up start-up sequence by avoiding un-needed flushes
[ https://issues.apache.org/jira/browse/CASSANDRA-13031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795513#comment-15795513 ] Ariel Weisberg commented on CASSANDRA-13031: Are these logs apples to oranges? There are 40 instances in one and one in the other and the code change doesn't look like it should remove some of them like changes to triggers or functions. > Speed-up start-up sequence by avoiding un-needed flushes > > > Key: CASSANDRA-13031 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13031 > Project: Cassandra > Issue Type: Bug >Reporter: Corentin Chary >Assignee: Corentin Chary >Priority: Minor > Fix For: 3.x > > Attachments: 0001-Avoid-un-needed-system-flushes-on-startup.patch, > debug-fast.log, debug.log, debug_130131.diff, debug_130131_2.diff > > > Similar to CASSANDRA-12969, do a conditional update for all functions > with a forced blocking flush to avoid slowed-down boot sequences. The > small performance hit of doing a read is always smaller than the one > associated with a fsync(). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13090) Coalescing strategy sleep too much
[ https://issues.apache.org/jira/browse/CASSANDRA-13090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795484#comment-15795484 ] Ariel Weisberg commented on CASSANDRA-13090: Ouch. I am just not getting this right today. I would be happy to have it as one patch. I think if we set it to 8 it will still be better than 128 in a heavy backlog , but it's also still safe in that it's way more coalescing than we could possibly benefit from. I think tweaking the number has diminishing returns because you only hit this when the backlog grows and in that case you are already not looking at coalescing as the problem or the solution. > Coalescing strategy sleep too much > -- > > Key: CASSANDRA-13090 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13090 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Corentin Chary > Fix For: 3.x > > Attachments: 0001-Fix-wait-time-coalescing-CASSANDRA-13090.patch > > > With the current code maybeSleep is called even if we managed to take > maxItems out of the backlog. In this case we should really avoid sleeping > because it means that backlog is building up. > I'll send a patch shortly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[cassandra] Git Push Summary
Repository: cassandra Updated Tags: refs/tags/3.10-tentative [deleted] 96d67b109
[jira] [Commented] (CASSANDRA-13090) Coalescing strategy sleep too much
[ https://issues.apache.org/jira/browse/CASSANDRA-13090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795466#comment-15795466 ] Corentin Chary commented on CASSANDRA-13090: Would you prefer count > 1 to start and then another patch to make it configurable (if necessary, I'll run benchmarks). limit isn't now + nanos / 16, it's now + nanos - nanos / 16, (or ~= now + nanos * 0.9, maybe this last form is better ?) > Coalescing strategy sleep too much > -- > > Key: CASSANDRA-13090 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13090 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Corentin Chary > Fix For: 3.x > > Attachments: 0001-Fix-wait-time-coalescing-CASSANDRA-13090.patch > > > With the current code maybeSleep is called even if we managed to take > maxItems out of the backlog. In this case we should really avoid sleeping > because it means that backlog is building up. > I'll send a patch shortly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13031) Speed-up start-up sequence by avoiding un-needed flushes
[ https://issues.apache.org/jira/browse/CASSANDRA-13031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795456#comment-15795456 ] Corentin Chary commented on CASSANDRA-13031: You can look for "Completed flushing" in debug.log and you'll get the timestamp of the left (thus the time spent doing these operations). You should see that each flush takes 500-300ms and each of the individual changes will remove this pause of hundred of ms. For those that need to do a read query they will take <1ms instead. I will re-run this with your patch tomorrow morning. > Speed-up start-up sequence by avoiding un-needed flushes > > > Key: CASSANDRA-13031 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13031 > Project: Cassandra > Issue Type: Bug >Reporter: Corentin Chary >Assignee: Corentin Chary >Priority: Minor > Fix For: 3.x > > Attachments: 0001-Avoid-un-needed-system-flushes-on-startup.patch, > debug-fast.log, debug.log, debug_130131.diff, debug_130131_2.diff > > > Similar to CASSANDRA-12969, do a conditional update for all functions > with a forced blocking flush to avoid slowed-down boot sequences. The > small performance hit of doing a read is always smaller than the one > associated with a fsync(). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13031) Speed-up start-up sequence by avoiding un-needed flushes
[ https://issues.apache.org/jira/browse/CASSANDRA-13031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795439#comment-15795439 ] Ariel Weisberg commented on CASSANDRA-13031: The debug output doesn't include the patch with the debugging information so I can't see the timings of the individual changes. I searched for the word "took" from the log messages and didn't find them. I want to understand what impact the individual changes have. > Speed-up start-up sequence by avoiding un-needed flushes > > > Key: CASSANDRA-13031 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13031 > Project: Cassandra > Issue Type: Bug >Reporter: Corentin Chary >Assignee: Corentin Chary >Priority: Minor > Fix For: 3.x > > Attachments: 0001-Avoid-un-needed-system-flushes-on-startup.patch, > debug-fast.log, debug.log, debug_130131.diff, debug_130131_2.diff > > > Similar to CASSANDRA-12969, do a conditional update for all functions > with a forced blocking flush to avoid slowed-down boot sequences. The > small performance hit of doing a read is always smaller than the one > associated with a fsync(). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CASSANDRA-13092) Debian package does not install the hostpot_compiler command file
Jan Urbański created CASSANDRA-13092: Summary: Debian package does not install the hostpot_compiler command file Key: CASSANDRA-13092 URL: https://issues.apache.org/jira/browse/CASSANDRA-13092 Project: Cassandra Issue Type: Bug Components: Packaging Reporter: Jan Urbański Priority: Trivial Attachments: install-jit-compiler-command-file-in-Debian-package.patch The default {{cassandra-env.sh}} file sets a JIT compiler commands file via {{-XX:CompileCommandFile=$CASSANDRA_CONF/hotspot_compiler}} but the Debian package does not install that file, even though it's generated during the build process. Trivial patch against trunk attached. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13090) Coalescing strategy sleep too much
[ https://issues.apache.org/jira/browse/CASSANDRA-13090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795422#comment-15795422 ] Ariel Weisberg commented on CASSANDRA-13090: Right but we don't need the network to coalesce for us since we are already doing it. But... there isn't a motivation to coalesce more than some number of messages. All it's going to do is add latency with minimal reduction in overhead. I see I understood limit incorrectly. It might be clearer as now + nano / 16 and some parens for those of us a bit weaker at math. > Coalescing strategy sleep too much > -- > > Key: CASSANDRA-13090 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13090 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Corentin Chary > Fix For: 3.x > > Attachments: 0001-Fix-wait-time-coalescing-CASSANDRA-13090.patch > > > With the current code maybeSleep is called even if we managed to take > maxItems out of the backlog. In this case we should really avoid sleeping > because it means that backlog is building up. > I'll send a patch shortly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13090) Coalescing strategy sleep too much
[ https://issues.apache.org/jira/browse/CASSANDRA-13090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795381#comment-15795381 ] Corentin Chary commented on CASSANDRA-13090: I didn't intend to change the behavior of parkLoop(), in theory it should do exactly the same as before. "limit" is just something that is almost like "timer" but good enough if we reach it. "timer - (now = System.nanoTime()) > nanos / 16" should be the same as "now < limit". Network will not coalesce anything/much because we set TCP_NODELAY to 1. > Coalescing strategy sleep too much > -- > > Key: CASSANDRA-13090 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13090 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Corentin Chary > Fix For: 3.x > > Attachments: 0001-Fix-wait-time-coalescing-CASSANDRA-13090.patch > > > With the current code maybeSleep is called even if we managed to take > maxItems out of the backlog. In this case we should really avoid sleeping > because it means that backlog is building up. > I'll send a patch shortly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13090) Coalescing strategy sleep too much
[ https://issues.apache.org/jira/browse/CASSANDRA-13090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795333#comment-15795333 ] Ariel Weisberg commented on CASSANDRA-13090: Nice find. I don't think comparing now and limit is valid because limit is a duration and now is a relative time. Can you add a unit test for this condition? Does it even make sense to try and coalesce more than some constant number of messages? At some point we should just let the network handle packets. I think waiting for backlog full is the wrong condition to avoid these extra sleeps. Maybe coalesce at most 4 or 8 messages? Definitely make it tunable. > Coalescing strategy sleep too much > -- > > Key: CASSANDRA-13090 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13090 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Corentin Chary > Fix For: 3.x > > Attachments: 0001-Fix-wait-time-coalescing-CASSANDRA-13090.patch > > > With the current code maybeSleep is called even if we managed to take > maxItems out of the backlog. In this case we should really avoid sleeping > because it means that backlog is building up. > I'll send a patch shortly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13039) Mutation time mostly spent in LinkedBlockingQueue.put() when writing with ONE
[ https://issues.apache.org/jira/browse/CASSANDRA-13039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Corentin Chary updated CASSANDRA-13039: --- Summary: Mutation time mostly spent in LinkedBlockingQueue.put() when writing with ONE (was: Mutation time mostly spent in LinkedBlockingQueue.put()) > Mutation time mostly spent in LinkedBlockingQueue.put() when writing with ONE > - > > Key: CASSANDRA-13039 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13039 > Project: Cassandra > Issue Type: Bug > Components: Coordination >Reporter: Corentin Chary > Attachments: mutation-linkedlist-block.png, profiler-snapshot.nps > > > On a setup with a sustained write load of 70kQPS per node and a RF of 2 it > looks like most of the mutation time is spend in > OutboundTcpConnection.enqueue() -> backlog.put() > backlog is an unbounded LinkedBlockingQueue, which means that .put() can only > be blocking if a lock is taken. I strongly suspect that this is caused by the > use of drainTo() in CoalescingStrategies which is causing contention for the > producers. > On the other hand, not using drainTo() could lead to starvation of the > consumers. > Possible solutions: > - Allow multiple connections per size and per hosts in > OutboundTcpConnectionPool > - Switch from drainTo to multiple take() > - Switch to ConcurrentLinkedQueue (which is lockless), also means we need > active polling. > Maybe a good solution would be something hybrid: a bounded > LinkedBlockingQueue and an unbounded ConcurrentLinkedQueue. This way you get > low latency when you don't have a lot of messages, and throughput when you do. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9754) Make index info heap friendly for large CQL partitions
[ https://issues.apache.org/jira/browse/CASSANDRA-9754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795310#comment-15795310 ] Branimir Lambov commented on CASSANDRA-9754: As this is not a critical bug-fix and hence the 2.1 version cannot go into the codebase, unfortunately I cannot justify investing the time to give it a full review until we have a trunk patch. I looked at the main {{BirchReader/Writer}} components again as they are likely to stay the same for a trunk patch. Here are my comments: - I still think not storing the first key in intermediate nodes would save significant amounts of space and time and should be implemented. - There are a pair of methods called {{binarySearch}} which return the floor (less than or equal) for a given key. I would prefer them to be named after what they produce, as {{binarySearch}} implies a certain kind of result (negative for non-equal) and the fact that it is implemented through binary search is largely an implementation detail. - [{{entries == 1}} check|https://github.com/apache/cassandra/compare/trunk...mkjellman:CASSANDRA-9754-2.1-v2#diff-8561257b0836a3403d14d5dac9f8b3d0R393] looks suspect, as there should be no need for one-entry nodes in the tree. Could you comment why it is necessary? - I think it is better to handle the special meaning of empty key and the {{reversed}} flag first thing in [the {{search}} method|https://github.com/apache/cassandra/compare/trunk...mkjellman:CASSANDRA-9754-2.1-v2#diff-8561257b0836a3403d14d5dac9f8b3d0R432] rather than propagating it into the {{binarySearch}} calls, especially since you know the position of the first ({{0}}) and last ({{descriptor.getFirstNodeOffset() - descriptor.getAlignedPageSize()}}) leaf nodes in the tree. The iterator initialization already does that. - The meaning of "matching" in the [{{search}} doc|https://github.com/mkjellman/cassandra/commit/b17f2c1317326fac7b6864a2fc61d7ee2580f740#diff-8561257b0836a3403d14d5dac9f8b3d0R429] is unclear. What happens on no equal element present? If it returns the floor, please state so. - {{BirchIterator}} could use a forward/reversed implementation split. - There's a lot of potential off-by-one mishap in {{BirchIterator}}, and not only in the reverse case: -- the first element returned in the forward case can be less than {{searchKey}} (if not equal); -- the respective problem is also there in the reverse case; -- the page we find the entry in during initialization ({{currentPage}}) is not the page we apply that index to during the first {{computeNext}} ({{currentPage - 1}}); -- the column iteration code probably masks the first two at some non-trivial efficiency cost, but the latter looks like something that can get to the surface as missed data. - The [level generation loop in {{BirchWriter}}|https://github.com/apache/cassandra/compare/trunk...mkjellman:CASSANDRA-9754-2.1-v2#diff-c5fa7e9cc1eac71a75b38caa716f64c3R260] is effectively a {{while (true)}} loop as we always reset {{inProgressInnerNodeLevel}} before going into it. - The list should never become empty, thus the [emptyness check|https://github.com/apache/cassandra/compare/trunk...mkjellman:CASSANDRA-9754-2.1-v2#diff-c5fa7e9cc1eac71a75b38caa716f64c3R282] is suspect -- if necessary it would indicate an error in the logic; I'd replace is with a non-empty assertion. > Make index info heap friendly for large CQL partitions > -- > > Key: CASSANDRA-9754 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9754 > Project: Cassandra > Issue Type: Improvement >Reporter: sankalp kohli >Assignee: Michael Kjellman >Priority: Minor > Fix For: 4.x > > Attachments: 0f8e28c220fd5af6c7b5dd2d3dab6936c4aa4b6b.patch, > gc_collection_times_with_birch.png, gc_collection_times_without_birch.png, > gc_counts_with_birch.png, gc_counts_without_birch.png, > perf_cluster_1_with_birch_read_latency_and_counts.png, > perf_cluster_1_with_birch_write_latency_and_counts.png, > perf_cluster_2_with_birch_read_latency_and_counts.png, > perf_cluster_2_with_birch_write_latency_and_counts.png, > perf_cluster_3_without_birch_read_latency_and_counts.png, > perf_cluster_3_without_birch_write_latency_and_counts.png > > > Looking at a heap dump of 2.0 cluster, I found that majority of the objects > are IndexInfo and its ByteBuffers. This is specially bad in endpoints with > large CQL partitions. If a CQL partition is say 6,4GB, it will have 100K > IndexInfo objects and 200K ByteBuffers. This will create a lot of churn for > GC. Can this be improved by not creating so many objects? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13052) Repair process is violating the start/end token limits for small ranges
[ https://issues.apache.org/jira/browse/CASSANDRA-13052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795285#comment-15795285 ] Stefan Podkowinski commented on CASSANDRA-13052: {quote} We soon notice heavy streaming and according to the logs the number of ranges streamed was in thousands. {quote} [~cmposto], I'm currently a bit confused while trying to evaluate the actual effect of this behaviour. I was first a bit concerned about either having ranges streamed that shouldn't be repaired or to send identical ranges thousand of times. But I've come to the conclusion that none of this should happen, as {{StreamSession.addTransferRanges()}} should normalize all redundant ranges into a singe range, before starting to stream any files. Can you further describe how this bug resulted into "heavy streaming" on your cluster? What was is that you noticed before further looking into this issue? > Repair process is violating the start/end token limits for small ranges > --- > > Key: CASSANDRA-13052 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13052 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging > Environment: We tried this in 2.0.14 and 3.9, same bug. >Reporter: Cristian P >Assignee: Stefan Podkowinski > Attachments: ccm_reproduce-13052.txt, system-dev-debug-13052.log > > > We tried to do a single token repair by providing 2 consecutive token values > for a large column family. We soon notice heavy streaming and according to > the logs the number of ranges streamed was in thousands. > After investigation we found a bug in the two partitioner classes we use > (RandomPartitioner and Murmur3Partitioner). > The midpoint method used by MerkleTree.differenceHelper method to find ranges > with differences for streaming returns abnormal values (way out of the > initial range requested for repair) if the repair requested range is small (I > expect smaller than 2^15). > Here is the simple code to reproduce the bug for Murmur3Partitioner: > Token left = new Murmur3Partitioner.LongToken(123456789L); > Token right = new Murmur3Partitioner.LongToken(123456789L); > IPartitioner partitioner = new Murmur3Partitioner(); > Token midpoint = partitioner.midpoint(left, right); > System.out.println("Murmur3: [ " + left.getToken() + " : " + > midpoint.getToken() + " : " + right.getToken() + " ]"); > The output is: > Murmur3: [ 123456789 : -9223372036731319019 : 123456789 ] > Note that the midpoint token is nowhere near the suggested repair range. This > will happen if during the parsing of the tree (in > MerkleTree.differenceHelper) in search for differences there isn't enough > tokens for the split and the subrange becomes 0 (left.token=right.token) as > in the above test. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-4663) Streaming sends one file at a time serially.
[ https://issues.apache.org/jira/browse/CASSANDRA-4663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795256#comment-15795256 ] Jakub Lida edited comment on CASSANDRA-4663 at 1/3/17 3:04 PM: --- Does it affect repair streaming sessions as well? was (Author: jlida): Does it affect repair streaming sesions as well? > Streaming sends one file at a time serially. > - > > Key: CASSANDRA-4663 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4663 > Project: Cassandra > Issue Type: Improvement >Reporter: sankalp kohli >Priority: Minor > Fix For: 3.x > > Attachments: > 0001-streaming-add-a-way-to-configure-the-number-of-conne.patch > > > This is not fast enough when someone is using SSD and may be 10G link. We > should try to create multiple connections and send multiple files in > parallel. > Current approach under utilize the link(even 1G). > This change will improve the bootstrapping time of a node. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-4663) Streaming sends one file at a time serially.
[ https://issues.apache.org/jira/browse/CASSANDRA-4663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795256#comment-15795256 ] Jakub Lida commented on CASSANDRA-4663: --- Does it affect repair streaming sesions as well? > Streaming sends one file at a time serially. > - > > Key: CASSANDRA-4663 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4663 > Project: Cassandra > Issue Type: Improvement >Reporter: sankalp kohli >Priority: Minor > Fix For: 3.x > > Attachments: > 0001-streaming-add-a-way-to-configure-the-number-of-conne.patch > > > This is not fast enough when someone is using SSD and may be 10G link. We > should try to create multiple connections and send multiple files in > parallel. > Current approach under utilize the link(even 1G). > This change will improve the bootstrapping time of a node. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CASSANDRA-13091) SASI unset memory access
Alex Petrov created CASSANDRA-13091: --- Summary: SASI unset memory access Key: CASSANDRA-13091 URL: https://issues.apache.org/jira/browse/CASSANDRA-13091 Project: Cassandra Issue Type: Bug Reporter: Alex Petrov While running SASI tests, the following issue keeps popping up on trunk: {code} [junit] DEBUG [main] 2017-01-03 15:30:38,708 ?:? - Failed search an index /Users/oleksandrpetrov/foss/java/backup/cassandra/build/test/cassandra/data:0/sasi/clustering_test_cf_1-28004b20d1c111e6a96b29c83c9e6808/mc-3-big-SI_age.db, skipping. [junit] java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code [junit] at org.apache.cassandra.index.sasi.utils.MappedBuffer.position(MappedBuffer.java:105) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.disk.OnDiskIndex$Level.getBlock(OnDiskIndex.java:556) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.disk.OnDiskIndex.searchIndex(OnDiskIndex.java:464) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.disk.OnDiskIndex.getTerm(OnDiskIndex.java:458) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.disk.OnDiskIndex.search(OnDiskIndex.java:231) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.SSTableIndex.search(SSTableIndex.java:103) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.TermIterator.lambda$build$0(TermIterator.java:130) ~[main/:na] [junit] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_91] [junit] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_91] [junit] at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299) ~[guava-18.0.jar:na] [junit] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) ~[na:1.8.0_91] [junit] at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50) ~[guava-18.0.jar:na] [junit] at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:37) ~[guava-18.0.jar:na] [junit] at org.apache.cassandra.index.sasi.TermIterator.build(TermIterator.java:125) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.plan.QueryController.getIndexes(QueryController.java:139) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.plan.Operation$Builder.complete(Operation.java:433) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.plan.QueryPlan.analyze(QueryPlan.java:57) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.plan.QueryPlan.execute(QueryPlan.java:68) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.SASIIndex.lambda$searcherFor$2(SASIIndex.java:287) ~[main/:na] [junit] at org.apache.cassandra.db.ReadCommand.executeLocally(ReadCommand.java:357) ~[main/:na] [junit] at org.apache.cassandra.db.ReadCommand.executeInternal(ReadCommand.java:387) ~[main/:na] [junit] at org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:425) ~[main/:na] [junit] at org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:411) ~[main/:na] [junit] at org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:78) ~[main/:na] [junit] at org.apache.cassandra.cql3.QueryProcessor.executeOnceInternal(QueryProcessor.java:332) ~[main/:na] [junit] at org.apache.cassandra.index.sasi.SASIIndexTest.executeCQL(SASIIndexTest.java:2438) ~[classes/:na] [junit] at org.apache.cassandra.index.sasi.SASIIndexTest.testTableRebuild(SASIIndexTest.java:1895) ~[classes/:na] [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91] [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91] [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91] [junit] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91] [junit] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) ~[junit-4.6.jar:na] [junit] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) ~[junit-4.6.jar:na] [junit] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) ~[junit-4.6.jar:na] [junit] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) ~[junit-4.6.jar:na] [junit] at
[jira] [Resolved] (CASSANDRA-12940) Large compaction backlogs should slow down repairs
[ https://issues.apache.org/jira/browse/CASSANDRA-12940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paulo Motta resolved CASSANDRA-12940. - Resolution: Duplicate This is very similar to the idea proposed and partially implemented on CASSANDRA-10862 so I will close this as duplicate of that so we centralize discussion in one place. Feel free to continue work on that ticket. > Large compaction backlogs should slow down repairs > -- > > Key: CASSANDRA-12940 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12940 > Project: Cassandra > Issue Type: Improvement >Reporter: Tom van der Woerdt > > Repairs cause a flood of small sstables. In some situations the small > sstables come in so fast that it takes longer to commit the compaction > transaction than it takes to stream in the tables. This will cause a buildup > in sstables, and this buildup causes compaction to go even slower (see > CASSANDRA-12764). > For a cluster of mine this means running into nodes with >100 loadavg, with > tables that have 10k sstables. After the repair finishes the nodes go back to > normal, but it takes a while and affects query latency a lot. > The compaction paths could probably be faster, though I'm more interested in > making repairs wait for compaction. When we have a L0 with 1+ tables, the > repair path should probably wait a minute. > All I did was run 'nodetool repair' : > {noformat} > SSTable count: 11755 > SSTables in each level: [11709/4, 23/10, 50, 0, 0, 0, 0, 0, 0] > {noformat} > `nodetool compactionstats' shows 17 pending tasks (seems a bit low) and > `nodetool netstats' shows 1861 lines of text over 138 stream sessions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-11830) "nodetool flush" not flushing system keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-11830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795017#comment-15795017 ] Paulo Motta commented on CASSANDRA-11830: - This seems like an unintended side-effect of skipping the system keyspaces just for the repair command on CASSANDRA-5483 as noted by [~tgrab...@gmail.com], but it ended up skipping for all nodetool commands that are executed without explicit keyspace set. So we can restore the previous behavior for all commands, except repair. > "nodetool flush" not flushing system keyspace > - > > Key: CASSANDRA-11830 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11830 > Project: Cassandra > Issue Type: Bug > Components: Tools > Environment: Ubuntu 14.04, Oracle Java 8, Cassandra 2.2.6 >Reporter: Dominik Keil > > I'm regularly splitting off maintenance systems from our QA cluster by adding > a new node to a new "datacenter", joining it, then stopping and removing it > (adapting the schema before and after accordingly). > In order to not mix up the systems I rename the cluster in the newly created > maintenance system by updating cluster_name in system.local > In the past, when running "nodetool flush" then restarting Cassandra, this > worked as expected. > However, this time it did not. After restarting Cassandra the old cluster > name was in place every time. However, explicitly flushing the system > keyspace using "nodetool flush system" did work as expected. > Is this a bug or did the default behaviour of "nodetool flush" change at some > point? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-4663) Streaming sends one file at a time serially.
[ https://issues.apache.org/jira/browse/CASSANDRA-4663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795010#comment-15795010 ] Corentin Chary commented on CASSANDRA-4663: --- [~jasobrown] what do you think about the attached patch (until something better is done for 4.0) > Streaming sends one file at a time serially. > - > > Key: CASSANDRA-4663 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4663 > Project: Cassandra > Issue Type: Improvement >Reporter: sankalp kohli >Priority: Minor > Fix For: 3.x > > Attachments: > 0001-streaming-add-a-way-to-configure-the-number-of-conne.patch > > > This is not fast enough when someone is using SSD and may be 10G link. We > should try to create multiple connections and send multiple files in > parallel. > Current approach under utilize the link(even 1G). > This change will improve the bootstrapping time of a node. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13038) 33% of compaction time spent in StreamingHistogram.update()
[ https://issues.apache.org/jira/browse/CASSANDRA-13038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Corentin Chary updated CASSANDRA-13038: --- Reviewer: Sylvain Lebresne Status: Patch Available (was: Open) > 33% of compaction time spent in StreamingHistogram.update() > --- > > Key: CASSANDRA-13038 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13038 > Project: Cassandra > Issue Type: Bug > Components: Compaction >Reporter: Corentin Chary >Assignee: Corentin Chary > Attachments: compaction-speedup.patch, > compaction-streaminghistrogram.png, profiler-snapshot.nps > > > With the following table, that contains a *lot* of cells: > {code} > CREATE TABLE biggraphite.datapoints_11520p_60s ( > metric uuid, > time_start_ms bigint, > offset smallint, > count int, > value double, > PRIMARY KEY ((metric, time_start_ms), offset) > ) WITH CLUSTERING ORDER BY (offset DESC); > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', > 'compaction_window_size': '6', 'compaction_window_unit': 'HOURS', > 'max_threshold': '32', 'min_threshold': '6'} > Keyspace : biggraphite > Read Count: 1822 > Read Latency: 1.8870054884742042 ms. > Write Count: 2212271647 > Write Latency: 0.027705127678653473 ms. > Pending Flushes: 0 > Table: datapoints_11520p_60s > SSTable count: 47 > Space used (live): 300417555945 > Space used (total): 303147395017 > Space used by snapshots (total): 0 > Off heap memory used (total): 207453042 > SSTable Compression Ratio: 0.4955200053039823 > Number of keys (estimate): 16343723 > Memtable cell count: 220576 > Memtable data size: 17115128 > Memtable off heap memory used: 0 > Memtable switch count: 2872 > Local read count: 0 > Local read latency: NaN ms > Local write count: 1103167888 > Local write latency: 0.025 ms > Pending flushes: 0 > Percent repaired: 0.0 > Bloom filter false positives: 0 > Bloom filter false ratio: 0.0 > Bloom filter space used: 105118296 > Bloom filter off heap memory used: 106547192 > Index summary off heap memory used: 27730962 > Compression metadata off heap memory used: 73174888 > Compacted partition minimum bytes: 61 > Compacted partition maximum bytes: 51012 > Compacted partition mean bytes: 7899 > Average live cells per slice (last five minutes): NaN > Maximum live cells per slice (last five minutes): 0 > Average tombstones per slice (last five minutes): NaN > Maximum tombstones per slice (last five minutes): 0 > Dropped Mutations: 0 > {code} > It looks like a good chunk of the compaction time is lost in > StreamingHistogram.update() (which is used to store the estimated tombstone > drop times). > This could be caused by a huge number of different deletion times which would > makes the bin huge but it this histogram should be capped to 100 keys. It's > more likely caused by the huge number of cells. > A simple solutions could be to only take into accounts part of the cells, the > fact the this table has a TWCS also gives us an additional hint that sampling > deletion times would be fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CASSANDRA-13038) 33% of compaction time spent in StreamingHistogram.update()
[ https://issues.apache.org/jira/browse/CASSANDRA-13038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Corentin Chary reassigned CASSANDRA-13038: -- Assignee: Corentin Chary > 33% of compaction time spent in StreamingHistogram.update() > --- > > Key: CASSANDRA-13038 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13038 > Project: Cassandra > Issue Type: Bug > Components: Compaction >Reporter: Corentin Chary >Assignee: Corentin Chary > Attachments: compaction-speedup.patch, > compaction-streaminghistrogram.png, profiler-snapshot.nps > > > With the following table, that contains a *lot* of cells: > {code} > CREATE TABLE biggraphite.datapoints_11520p_60s ( > metric uuid, > time_start_ms bigint, > offset smallint, > count int, > value double, > PRIMARY KEY ((metric, time_start_ms), offset) > ) WITH CLUSTERING ORDER BY (offset DESC); > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', > 'compaction_window_size': '6', 'compaction_window_unit': 'HOURS', > 'max_threshold': '32', 'min_threshold': '6'} > Keyspace : biggraphite > Read Count: 1822 > Read Latency: 1.8870054884742042 ms. > Write Count: 2212271647 > Write Latency: 0.027705127678653473 ms. > Pending Flushes: 0 > Table: datapoints_11520p_60s > SSTable count: 47 > Space used (live): 300417555945 > Space used (total): 303147395017 > Space used by snapshots (total): 0 > Off heap memory used (total): 207453042 > SSTable Compression Ratio: 0.4955200053039823 > Number of keys (estimate): 16343723 > Memtable cell count: 220576 > Memtable data size: 17115128 > Memtable off heap memory used: 0 > Memtable switch count: 2872 > Local read count: 0 > Local read latency: NaN ms > Local write count: 1103167888 > Local write latency: 0.025 ms > Pending flushes: 0 > Percent repaired: 0.0 > Bloom filter false positives: 0 > Bloom filter false ratio: 0.0 > Bloom filter space used: 105118296 > Bloom filter off heap memory used: 106547192 > Index summary off heap memory used: 27730962 > Compression metadata off heap memory used: 73174888 > Compacted partition minimum bytes: 61 > Compacted partition maximum bytes: 51012 > Compacted partition mean bytes: 7899 > Average live cells per slice (last five minutes): NaN > Maximum live cells per slice (last five minutes): 0 > Average tombstones per slice (last five minutes): NaN > Maximum tombstones per slice (last five minutes): 0 > Dropped Mutations: 0 > {code} > It looks like a good chunk of the compaction time is lost in > StreamingHistogram.update() (which is used to store the estimated tombstone > drop times). > This could be caused by a huge number of different deletion times which would > makes the bin huge but it this histogram should be capped to 100 keys. It's > more likely caused by the huge number of cells. > A simple solutions could be to only take into accounts part of the cells, the > fact the this table has a TWCS also gives us an additional hint that sampling > deletion times would be fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CASSANDRA-13031) Speed-up start-up sequence by avoiding un-needed flushes
[ https://issues.apache.org/jira/browse/CASSANDRA-13031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Corentin Chary reassigned CASSANDRA-13031: -- Assignee: Corentin Chary > Speed-up start-up sequence by avoiding un-needed flushes > > > Key: CASSANDRA-13031 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13031 > Project: Cassandra > Issue Type: Bug >Reporter: Corentin Chary >Assignee: Corentin Chary >Priority: Minor > Fix For: 3.x > > Attachments: 0001-Avoid-un-needed-system-flushes-on-startup.patch, > debug-fast.log, debug.log, debug_130131.diff, debug_130131_2.diff > > > Similar to CASSANDRA-12969, do a conditional update for all functions > with a forced blocking flush to avoid slowed-down boot sequences. The > small performance hit of doing a read is always smaller than the one > associated with a fsync(). -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12606) CQLSSTableWriter unable to use blob conversion functions
[ https://issues.apache.org/jira/browse/CASSANDRA-12606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15795006#comment-15795006 ] Alex Petrov commented on CASSANDRA-12606: - Rebased on top of latest branches. > CQLSSTableWriter unable to use blob conversion functions > > > Key: CASSANDRA-12606 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12606 > Project: Cassandra > Issue Type: Bug > Components: CQL, Tools >Reporter: Mark Reddy >Assignee: Alex Petrov >Priority: Minor > > Attempting to use blob conversion functions e.g. textAsBlob, from 3.0 - 3.7 > results in: > {noformat} > Exception in thread "main" > org.apache.cassandra.exceptions.InvalidRequestException: Unknown function > textasblob called > at > org.apache.cassandra.cql3.functions.FunctionCall$Raw.prepare(FunctionCall.java:136) > at > org.apache.cassandra.cql3.Operation$SetValue.prepare(Operation.java:163) > at > org.apache.cassandra.cql3.statements.UpdateStatement$ParsedInsert.prepareInternal(UpdateStatement.java:173) > at > org.apache.cassandra.cql3.statements.ModificationStatement$Parsed.prepare(ModificationStatement.java:785) > at > org.apache.cassandra.cql3.statements.ModificationStatement$Parsed.prepare(ModificationStatement.java:771) > at > org.apache.cassandra.io.sstable.CQLSSTableWriter$Builder.prepareInsert(CQLSSTableWriter.java:567) > at > org.apache.cassandra.io.sstable.CQLSSTableWriter$Builder.build(CQLSSTableWriter.java:510) > {noformat} > The following snippet will reproduce the issue > {code} > String table = String.format("%s.%s", "test_ks", "test_table"); > String schema = String.format("CREATE TABLE %s (test_text text, test_blob > blob, PRIMARY KEY(test_text));", table); > String insertStatement = String.format("INSERT INTO %s (test_text, test_blob) > VALUES (?, textAsBlob(?))", table); > File tempDir = Files.createTempDirectory("tempDir").toFile(); > CQLSSTableWriter sstableWriter = CQLSSTableWriter.builder() > .forTable(schema) > .using(insertStatement) > .inDirectory(tempDir) > .build(); > {code} > This is caused in FunctionResolver.get(...) when > candidates.addAll(Schema.instance.getFunctions(name.asNativeFunction())); is > called, as there is no system keyspace initialised. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13038) 33% of compaction time spent in StreamingHistogram.update()
[ https://issues.apache.org/jira/browse/CASSANDRA-13038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Corentin Chary updated CASSANDRA-13038: --- Attachment: compaction-speedup.patch What about this ? Simply truncating to the next hour. > 33% of compaction time spent in StreamingHistogram.update() > --- > > Key: CASSANDRA-13038 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13038 > Project: Cassandra > Issue Type: Bug > Components: Compaction >Reporter: Corentin Chary > Attachments: compaction-speedup.patch, > compaction-streaminghistrogram.png, profiler-snapshot.nps > > > With the following table, that contains a *lot* of cells: > {code} > CREATE TABLE biggraphite.datapoints_11520p_60s ( > metric uuid, > time_start_ms bigint, > offset smallint, > count int, > value double, > PRIMARY KEY ((metric, time_start_ms), offset) > ) WITH CLUSTERING ORDER BY (offset DESC); > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', > 'compaction_window_size': '6', 'compaction_window_unit': 'HOURS', > 'max_threshold': '32', 'min_threshold': '6'} > Keyspace : biggraphite > Read Count: 1822 > Read Latency: 1.8870054884742042 ms. > Write Count: 2212271647 > Write Latency: 0.027705127678653473 ms. > Pending Flushes: 0 > Table: datapoints_11520p_60s > SSTable count: 47 > Space used (live): 300417555945 > Space used (total): 303147395017 > Space used by snapshots (total): 0 > Off heap memory used (total): 207453042 > SSTable Compression Ratio: 0.4955200053039823 > Number of keys (estimate): 16343723 > Memtable cell count: 220576 > Memtable data size: 17115128 > Memtable off heap memory used: 0 > Memtable switch count: 2872 > Local read count: 0 > Local read latency: NaN ms > Local write count: 1103167888 > Local write latency: 0.025 ms > Pending flushes: 0 > Percent repaired: 0.0 > Bloom filter false positives: 0 > Bloom filter false ratio: 0.0 > Bloom filter space used: 105118296 > Bloom filter off heap memory used: 106547192 > Index summary off heap memory used: 27730962 > Compression metadata off heap memory used: 73174888 > Compacted partition minimum bytes: 61 > Compacted partition maximum bytes: 51012 > Compacted partition mean bytes: 7899 > Average live cells per slice (last five minutes): NaN > Maximum live cells per slice (last five minutes): 0 > Average tombstones per slice (last five minutes): NaN > Maximum tombstones per slice (last five minutes): 0 > Dropped Mutations: 0 > {code} > It looks like a good chunk of the compaction time is lost in > StreamingHistogram.update() (which is used to store the estimated tombstone > drop times). > This could be caused by a huge number of different deletion times which would > makes the bin huge but it this histogram should be capped to 100 keys. It's > more likely caused by the huge number of cells. > A simple solutions could be to only take into accounts part of the cells, the > fact the this table has a TWCS also gives us an additional hint that sampling > deletion times would be fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13038) 33% of compaction time spent in StreamingHistogram.update()
[ https://issues.apache.org/jira/browse/CASSANDRA-13038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Corentin Chary updated CASSANDRA-13038: --- Attachment: (was: tombstone-histograms-expiring.patch) > 33% of compaction time spent in StreamingHistogram.update() > --- > > Key: CASSANDRA-13038 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13038 > Project: Cassandra > Issue Type: Bug > Components: Compaction >Reporter: Corentin Chary > Attachments: compaction-streaminghistrogram.png, profiler-snapshot.nps > > > With the following table, that contains a *lot* of cells: > {code} > CREATE TABLE biggraphite.datapoints_11520p_60s ( > metric uuid, > time_start_ms bigint, > offset smallint, > count int, > value double, > PRIMARY KEY ((metric, time_start_ms), offset) > ) WITH CLUSTERING ORDER BY (offset DESC); > AND compaction = {'class': > 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', > 'compaction_window_size': '6', 'compaction_window_unit': 'HOURS', > 'max_threshold': '32', 'min_threshold': '6'} > Keyspace : biggraphite > Read Count: 1822 > Read Latency: 1.8870054884742042 ms. > Write Count: 2212271647 > Write Latency: 0.027705127678653473 ms. > Pending Flushes: 0 > Table: datapoints_11520p_60s > SSTable count: 47 > Space used (live): 300417555945 > Space used (total): 303147395017 > Space used by snapshots (total): 0 > Off heap memory used (total): 207453042 > SSTable Compression Ratio: 0.4955200053039823 > Number of keys (estimate): 16343723 > Memtable cell count: 220576 > Memtable data size: 17115128 > Memtable off heap memory used: 0 > Memtable switch count: 2872 > Local read count: 0 > Local read latency: NaN ms > Local write count: 1103167888 > Local write latency: 0.025 ms > Pending flushes: 0 > Percent repaired: 0.0 > Bloom filter false positives: 0 > Bloom filter false ratio: 0.0 > Bloom filter space used: 105118296 > Bloom filter off heap memory used: 106547192 > Index summary off heap memory used: 27730962 > Compression metadata off heap memory used: 73174888 > Compacted partition minimum bytes: 61 > Compacted partition maximum bytes: 51012 > Compacted partition mean bytes: 7899 > Average live cells per slice (last five minutes): NaN > Maximum live cells per slice (last five minutes): 0 > Average tombstones per slice (last five minutes): NaN > Maximum tombstones per slice (last five minutes): 0 > Dropped Mutations: 0 > {code} > It looks like a good chunk of the compaction time is lost in > StreamingHistogram.update() (which is used to store the estimated tombstone > drop times). > This could be caused by a huge number of different deletion times which would > makes the bin huge but it this histogram should be capped to 100 keys. It's > more likely caused by the huge number of cells. > A simple solutions could be to only take into accounts part of the cells, the > fact the this table has a TWCS also gives us an additional hint that sampling > deletion times would be fine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13090) Coalescing strategy sleep too much
[ https://issues.apache.org/jira/browse/CASSANDRA-13090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Corentin Chary updated CASSANDRA-13090: --- Attachment: 0001-Fix-wait-time-coalescing-CASSANDRA-13090.patch > Coalescing strategy sleep too much > -- > > Key: CASSANDRA-13090 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13090 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Corentin Chary > Fix For: 3.x > > Attachments: 0001-Fix-wait-time-coalescing-CASSANDRA-13090.patch > > > With the current code maybeSleep is called even if we managed to take > maxItems out of the backlog. In this case we should really avoid sleeping > because it means that backlog is building up. > I'll send a patch shortly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13090) Coalescing strategy sleep too much
[ https://issues.apache.org/jira/browse/CASSANDRA-13090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Corentin Chary updated CASSANDRA-13090: --- Reviewer: Ariel Weisberg Fix Version/s: 3.x Status: Patch Available (was: Open) > Coalescing strategy sleep too much > -- > > Key: CASSANDRA-13090 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13090 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Corentin Chary > Fix For: 3.x > > > With the current code maybeSleep is called even if we managed to take > maxItems out of the backlog. In this case we should really avoid sleeping > because it means that backlog is building up. > I'll send a patch shortly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-5483) Repair tracing
[ https://issues.apache.org/jira/browse/CASSANDRA-5483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15794949#comment-15794949 ] Tomasz Grabiec commented on CASSANDRA-5483: --- This change seems to have changed the behavior of "nodetool flush" to not flush the system keyspace (see CASSANDRA-11830). {code} commit f5866ca2bac8ce530bb4e20832ff61e622206815 Author: Ben ChanDate: Wed Dec 3 13:15:10 2014 -0600 Add repair tracing Patch by Ben Chan; reviewed by jmckenzie for CASSANDRA-5483 {code} Relevant hunk: {code} --- a/src/java/org/apache/cassandra/tools/NodeTool.java +++ b/src/java/org/apache/cassandra/tools/NodeTool.java @@ -318,10 +318,15 @@ public class NodeTool protected List parseOptionalKeyspace(List cmdArgs, NodeProbe nodeProbe) { +return parseOptionalKeyspace(cmdArgs, nodeProbe, false); +} + +protected List parseOptionalKeyspace(List cmdArgs, NodeProbe nodeProbe, boolean includeSystemKS) +{ List keyspaces = new ArrayList<>(); if (cmdArgs == null || cmdArgs.isEmpty()) -keyspaces.addAll(nodeProbe.getKeyspaces()); +keyspaces.addAll(includeSystemKS ? nodeProbe.getKeyspaces() : nodeProbe.getNonSystemKeyspaces()); else keyspaces.add(cmdArgs.get(0)); {code} I wonder what is the rationale for this. > Repair tracing > -- > > Key: CASSANDRA-5483 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5483 > Project: Cassandra > Issue Type: Improvement > Components: Tools >Reporter: Yuki Morishita >Assignee: Ben Chan >Priority: Minor > Labels: repair > Fix For: 2.2.0 beta 1 > > Attachments: 5483-full-trunk.txt, > 5483-v06-04-Allow-tracing-ttl-to-be-configured.patch, > 5483-v06-05-Add-a-command-column-to-system_traces.events.patch, > 5483-v06-06-Fix-interruption-in-tracestate-propagation.patch, > 5483-v07-07-Better-constructor-parameters-for-DebuggableThreadPoolExecutor.patch, > 5483-v07-08-Fix-brace-style.patch, > 5483-v07-09-Add-trace-option-to-a-more-complete-set-of-repair-functions.patch, > 5483-v07-10-Correct-name-of-boolean-repairedAt-to-fullRepair.patch, > 5483-v08-11-Shorten-trace-messages.-Use-Tracing-begin.patch, > 5483-v08-12-Trace-streaming-in-Differencer-StreamingRepairTask.patch, > 5483-v08-13-sendNotification-of-local-traces-back-to-nodetool.patch, > 5483-v08-14-Poll-system_traces.events.patch, > 5483-v08-15-Limit-trace-notifications.-Add-exponential-backoff.patch, > 5483-v09-16-Fix-hang-caused-by-incorrect-exit-code.patch, > 5483-v10-17-minor-bugfixes-and-changes.patch, > 5483-v10-rebased-and-squashed-471f5cc.patch, 5483-v11-01-squashed.patch, > 5483-v11-squashed-nits.patch, 5483-v12-02-cassandra-yaml-ttl-doc.patch, > 5483-v13-608fb03-May-14-trace-formatting-changes.patch, > 5483-v14-01-squashed.patch, > 5483-v15-02-Hook-up-exponential-backoff-functionality.patch, > 5483-v15-03-Exact-doubling-for-exponential-backoff.patch, > 5483-v15-04-Re-add-old-StorageService-JMX-signatures.patch, > 5483-v15-05-Move-command-column-to-system_traces.sessions.patch, > 5483-v15.patch, 5483-v17-00.patch, 5483-v17-01.patch, 5483-v17.patch, > ccm-repair-test, cqlsh-left-justify-text-columns.patch, > prerepair-vs-postbuggedrepair.diff, test-5483-system_traces-events.txt, > trunk@4620823-5483-v02-0001-Trace-filtering-and-tracestate-propagation.patch, > trunk@4620823-5483-v02-0002-Put-a-few-traces-parallel-to-the-repair-logging.patch, > tr...@8ebeee1-5483-v01-001-trace-filtering-and-tracestate-propagation.txt, > tr...@8ebeee1-5483-v01-002-simple-repair-tracing.txt, > v02p02-5483-v03-0003-Make-repair-tracing-controllable-via-nodetool.patch, > v02p02-5483-v04-0003-This-time-use-an-EnumSet-to-pass-boolean-repair-options.patch, > v02p02-5483-v05-0003-Use-long-instead-of-EnumSet-to-work-with-JMX.patch > > > I think it would be nice to log repair stats and results like query tracing > stores traces to system keyspace. With it, you don't have to lookup each log > file to see what was the status and how it performed the repair you invoked. > Instead, you can query the repair log with session ID to see the state and > stats of all nodes involved in that repair session. -- This message was sent by Atlassian JIRA (v6.3.4#6332)