[1/2] git commit: Throw EOFException if we run out of chunks in compressed file
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1.0 af188ed36 - 39b81967f Throw EOFException if we run out of chunks in compressed file Patch by marcuse; reviewed by yukim for CASSANDRA-7664. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/76adf0e1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/76adf0e1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/76adf0e1 Branch: refs/heads/cassandra-2.1.0 Commit: 76adf0e12ed91ee7c75164872202bff29a2ad7f4 Parents: ecf1bae Author: Marcus Eriksson marc...@apache.org Authored: Tue Aug 19 11:45:57 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Aug 20 08:21:43 2014 +0200 -- CHANGES.txt | 2 ++ .../compress/CompressedInputStream.java | 17 +-- .../compress/CompressedInputStreamTest.java | 23 +++- 3 files changed, 35 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 304d9bf..c8f7591 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Throw EOFException if we run out of chunks in compressed datafile + (CASSANDRA-7664) * Throw InvalidRequestException when queries contain relations on entire collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java -- diff --git a/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java b/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java index 698c2fe..ef019c2 100644 --- a/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java +++ b/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java @@ -58,6 +58,8 @@ public class CompressedInputStream extends InputStream // raw checksum bytes private final byte[] checksumBytes = new byte[4]; +private static final byte[] POISON_PILL = new byte[0]; + private long totalCompressedBytesRead; private final boolean hasPostCompressionAdlerChecksums; @@ -83,7 +85,10 @@ public class CompressedInputStream extends InputStream { try { -decompress(dataBuffer.take()); +byte[] compressedWithCRC = dataBuffer.take(); +if (compressedWithCRC == POISON_PILL) +throw new EOFException(No chunk available); +decompress(compressedWithCRC); } catch (InterruptedException e) { @@ -162,7 +167,15 @@ public class CompressedInputStream extends InputStream int bufferRead = 0; while (bufferRead readLength) -bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); +{ +int r = source.read(compressedWithCRC, bufferRead, readLength - bufferRead); +if (r 0) +{ +dataBuffer.put(POISON_PILL); +return; // throw exception where we consume dataBuffer +} +bufferRead += r; +} dataBuffer.put(compressedWithCRC); } } http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java -- diff --git a/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java b/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java index 027c84c..532b506 100644 --- a/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java +++ b/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java @@ -19,6 +19,7 @@ package org.apache.cassandra.streaming.compress; import java.io.ByteArrayInputStream; import java.io.DataInputStream; +import java.io.EOFException; import java.io.File; import java.io.RandomAccessFile; import java.util.*; @@ -42,18 +43,23 @@ public class CompressedInputStreamTest @Test public void testCompressedRead() throws Exception { -testCompressedReadWith(new long[]{0L}); -testCompressedReadWith(new long[]{1L}); -testCompressedReadWith(new long[]{100L}); +testCompressedReadWith(new long[]{0L},
[1/4] git commit: Throw EOFException if we run out of chunks in compressed file
Repository: cassandra Updated Branches: refs/heads/trunk 504d3c515 - 060c7961d Throw EOFException if we run out of chunks in compressed file Patch by marcuse; reviewed by yukim for CASSANDRA-7664. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/76adf0e1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/76adf0e1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/76adf0e1 Branch: refs/heads/trunk Commit: 76adf0e12ed91ee7c75164872202bff29a2ad7f4 Parents: ecf1bae Author: Marcus Eriksson marc...@apache.org Authored: Tue Aug 19 11:45:57 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Aug 20 08:21:43 2014 +0200 -- CHANGES.txt | 2 ++ .../compress/CompressedInputStream.java | 17 +-- .../compress/CompressedInputStreamTest.java | 23 +++- 3 files changed, 35 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 304d9bf..c8f7591 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Throw EOFException if we run out of chunks in compressed datafile + (CASSANDRA-7664) * Throw InvalidRequestException when queries contain relations on entire collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java -- diff --git a/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java b/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java index 698c2fe..ef019c2 100644 --- a/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java +++ b/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java @@ -58,6 +58,8 @@ public class CompressedInputStream extends InputStream // raw checksum bytes private final byte[] checksumBytes = new byte[4]; +private static final byte[] POISON_PILL = new byte[0]; + private long totalCompressedBytesRead; private final boolean hasPostCompressionAdlerChecksums; @@ -83,7 +85,10 @@ public class CompressedInputStream extends InputStream { try { -decompress(dataBuffer.take()); +byte[] compressedWithCRC = dataBuffer.take(); +if (compressedWithCRC == POISON_PILL) +throw new EOFException(No chunk available); +decompress(compressedWithCRC); } catch (InterruptedException e) { @@ -162,7 +167,15 @@ public class CompressedInputStream extends InputStream int bufferRead = 0; while (bufferRead readLength) -bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); +{ +int r = source.read(compressedWithCRC, bufferRead, readLength - bufferRead); +if (r 0) +{ +dataBuffer.put(POISON_PILL); +return; // throw exception where we consume dataBuffer +} +bufferRead += r; +} dataBuffer.put(compressedWithCRC); } } http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java -- diff --git a/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java b/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java index 027c84c..532b506 100644 --- a/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java +++ b/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java @@ -19,6 +19,7 @@ package org.apache.cassandra.streaming.compress; import java.io.ByteArrayInputStream; import java.io.DataInputStream; +import java.io.EOFException; import java.io.File; import java.io.RandomAccessFile; import java.util.*; @@ -42,18 +43,23 @@ public class CompressedInputStreamTest @Test public void testCompressedRead() throws Exception { -testCompressedReadWith(new long[]{0L}); -testCompressedReadWith(new long[]{1L}); -testCompressedReadWith(new long[]{100L}); +testCompressedReadWith(new long[]{0L}, false); +
[4/4] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/060c7961 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/060c7961 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/060c7961 Branch: refs/heads/trunk Commit: 060c7961d0a8374f53312a1cf9ea4b78a0e47b9c Parents: 504d3c5 bd692ba Author: Marcus Eriksson marc...@apache.org Authored: Wed Aug 20 08:25:59 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Aug 20 08:25:59 2014 +0200 -- CHANGES.txt | 2 ++ .../compress/CompressedInputStream.java | 17 +-- .../compress/CompressedInputStreamTest.java | 23 +++- 3 files changed, 35 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/060c7961/CHANGES.txt --
[1/3] git commit: Throw EOFException if we run out of chunks in compressed file
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 558bb7246 - bd692ba74 Throw EOFException if we run out of chunks in compressed file Patch by marcuse; reviewed by yukim for CASSANDRA-7664. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/76adf0e1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/76adf0e1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/76adf0e1 Branch: refs/heads/cassandra-2.1 Commit: 76adf0e12ed91ee7c75164872202bff29a2ad7f4 Parents: ecf1bae Author: Marcus Eriksson marc...@apache.org Authored: Tue Aug 19 11:45:57 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Aug 20 08:21:43 2014 +0200 -- CHANGES.txt | 2 ++ .../compress/CompressedInputStream.java | 17 +-- .../compress/CompressedInputStreamTest.java | 23 +++- 3 files changed, 35 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 304d9bf..c8f7591 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Throw EOFException if we run out of chunks in compressed datafile + (CASSANDRA-7664) * Throw InvalidRequestException when queries contain relations on entire collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java -- diff --git a/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java b/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java index 698c2fe..ef019c2 100644 --- a/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java +++ b/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java @@ -58,6 +58,8 @@ public class CompressedInputStream extends InputStream // raw checksum bytes private final byte[] checksumBytes = new byte[4]; +private static final byte[] POISON_PILL = new byte[0]; + private long totalCompressedBytesRead; private final boolean hasPostCompressionAdlerChecksums; @@ -83,7 +85,10 @@ public class CompressedInputStream extends InputStream { try { -decompress(dataBuffer.take()); +byte[] compressedWithCRC = dataBuffer.take(); +if (compressedWithCRC == POISON_PILL) +throw new EOFException(No chunk available); +decompress(compressedWithCRC); } catch (InterruptedException e) { @@ -162,7 +167,15 @@ public class CompressedInputStream extends InputStream int bufferRead = 0; while (bufferRead readLength) -bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); +{ +int r = source.read(compressedWithCRC, bufferRead, readLength - bufferRead); +if (r 0) +{ +dataBuffer.put(POISON_PILL); +return; // throw exception where we consume dataBuffer +} +bufferRead += r; +} dataBuffer.put(compressedWithCRC); } } http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java -- diff --git a/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java b/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java index 027c84c..532b506 100644 --- a/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java +++ b/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java @@ -19,6 +19,7 @@ package org.apache.cassandra.streaming.compress; import java.io.ByteArrayInputStream; import java.io.DataInputStream; +import java.io.EOFException; import java.io.File; import java.io.RandomAccessFile; import java.util.*; @@ -42,18 +43,23 @@ public class CompressedInputStreamTest @Test public void testCompressedRead() throws Exception { -testCompressedReadWith(new long[]{0L}); -testCompressedReadWith(new long[]{1L}); -testCompressedReadWith(new long[]{100L}); +testCompressedReadWith(new long[]{0L},
[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/39b81967 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/39b81967 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/39b81967 Branch: refs/heads/cassandra-2.1.0 Commit: 39b81967f18e1210a64fa98a1b84037235a09b9c Parents: af188ed 76adf0e Author: Marcus Eriksson marc...@apache.org Authored: Wed Aug 20 08:25:16 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Aug 20 08:25:16 2014 +0200 -- CHANGES.txt | 2 ++ .../compress/CompressedInputStream.java | 17 +-- .../compress/CompressedInputStreamTest.java | 23 +++- 3 files changed, 35 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/39b81967/CHANGES.txt -- diff --cc CHANGES.txt index 183d849,c8f7591..873eb78 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,37 -1,20 +1,39 @@@ -2.0.10 +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) +Merged from 2.0: + * Throw EOFException if we run out of chunks in compressed datafile +(CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) +Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226) http://git-wip-us.apache.org/repos/asf/cassandra/blob/39b81967/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java --
[3/3] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bd692ba7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bd692ba7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bd692ba7 Branch: refs/heads/cassandra-2.1 Commit: bd692ba74499428b0ee5c6defbb86966f3b30c12 Parents: 558bb72 39b8196 Author: Marcus Eriksson marc...@apache.org Authored: Wed Aug 20 08:25:28 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Aug 20 08:25:28 2014 +0200 -- CHANGES.txt | 2 ++ .../compress/CompressedInputStream.java | 17 +-- .../compress/CompressedInputStreamTest.java | 23 +++- 3 files changed, 35 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bd692ba7/CHANGES.txt --
[2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/39b81967 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/39b81967 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/39b81967 Branch: refs/heads/cassandra-2.1 Commit: 39b81967f18e1210a64fa98a1b84037235a09b9c Parents: af188ed 76adf0e Author: Marcus Eriksson marc...@apache.org Authored: Wed Aug 20 08:25:16 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Aug 20 08:25:16 2014 +0200 -- CHANGES.txt | 2 ++ .../compress/CompressedInputStream.java | 17 +-- .../compress/CompressedInputStreamTest.java | 23 +++- 3 files changed, 35 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/39b81967/CHANGES.txt -- diff --cc CHANGES.txt index 183d849,c8f7591..873eb78 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,37 -1,20 +1,39 @@@ -2.0.10 +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) +Merged from 2.0: + * Throw EOFException if we run out of chunks in compressed datafile +(CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) +Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226) http://git-wip-us.apache.org/repos/asf/cassandra/blob/39b81967/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java --
[3/4] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bd692ba7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bd692ba7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bd692ba7 Branch: refs/heads/trunk Commit: bd692ba74499428b0ee5c6defbb86966f3b30c12 Parents: 558bb72 39b8196 Author: Marcus Eriksson marc...@apache.org Authored: Wed Aug 20 08:25:28 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Aug 20 08:25:28 2014 +0200 -- CHANGES.txt | 2 ++ .../compress/CompressedInputStream.java | 17 +-- .../compress/CompressedInputStreamTest.java | 23 +++- 3 files changed, 35 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/bd692ba7/CHANGES.txt --
git commit: Throw EOFException if we run out of chunks in compressed file
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 ecf1baebb - 76adf0e12 Throw EOFException if we run out of chunks in compressed file Patch by marcuse; reviewed by yukim for CASSANDRA-7664. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/76adf0e1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/76adf0e1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/76adf0e1 Branch: refs/heads/cassandra-2.0 Commit: 76adf0e12ed91ee7c75164872202bff29a2ad7f4 Parents: ecf1bae Author: Marcus Eriksson marc...@apache.org Authored: Tue Aug 19 11:45:57 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Aug 20 08:21:43 2014 +0200 -- CHANGES.txt | 2 ++ .../compress/CompressedInputStream.java | 17 +-- .../compress/CompressedInputStreamTest.java | 23 +++- 3 files changed, 35 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 304d9bf..c8f7591 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Throw EOFException if we run out of chunks in compressed datafile + (CASSANDRA-7664) * Throw InvalidRequestException when queries contain relations on entire collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java -- diff --git a/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java b/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java index 698c2fe..ef019c2 100644 --- a/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java +++ b/src/java/org/apache/cassandra/streaming/compress/CompressedInputStream.java @@ -58,6 +58,8 @@ public class CompressedInputStream extends InputStream // raw checksum bytes private final byte[] checksumBytes = new byte[4]; +private static final byte[] POISON_PILL = new byte[0]; + private long totalCompressedBytesRead; private final boolean hasPostCompressionAdlerChecksums; @@ -83,7 +85,10 @@ public class CompressedInputStream extends InputStream { try { -decompress(dataBuffer.take()); +byte[] compressedWithCRC = dataBuffer.take(); +if (compressedWithCRC == POISON_PILL) +throw new EOFException(No chunk available); +decompress(compressedWithCRC); } catch (InterruptedException e) { @@ -162,7 +167,15 @@ public class CompressedInputStream extends InputStream int bufferRead = 0; while (bufferRead readLength) -bufferRead += source.read(compressedWithCRC, bufferRead, readLength - bufferRead); +{ +int r = source.read(compressedWithCRC, bufferRead, readLength - bufferRead); +if (r 0) +{ +dataBuffer.put(POISON_PILL); +return; // throw exception where we consume dataBuffer +} +bufferRead += r; +} dataBuffer.put(compressedWithCRC); } } http://git-wip-us.apache.org/repos/asf/cassandra/blob/76adf0e1/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java -- diff --git a/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java b/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java index 027c84c..532b506 100644 --- a/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java +++ b/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java @@ -19,6 +19,7 @@ package org.apache.cassandra.streaming.compress; import java.io.ByteArrayInputStream; import java.io.DataInputStream; +import java.io.EOFException; import java.io.File; import java.io.RandomAccessFile; import java.util.*; @@ -42,18 +43,23 @@ public class CompressedInputStreamTest @Test public void testCompressedRead() throws Exception { -testCompressedReadWith(new long[]{0L}); -testCompressedReadWith(new long[]{1L}); -testCompressedReadWith(new long[]{100L}); +testCompressedReadWith(new long[]{0L},
[2/4] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/39b81967 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/39b81967 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/39b81967 Branch: refs/heads/trunk Commit: 39b81967f18e1210a64fa98a1b84037235a09b9c Parents: af188ed 76adf0e Author: Marcus Eriksson marc...@apache.org Authored: Wed Aug 20 08:25:16 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Aug 20 08:25:16 2014 +0200 -- CHANGES.txt | 2 ++ .../compress/CompressedInputStream.java | 17 +-- .../compress/CompressedInputStreamTest.java | 23 +++- 3 files changed, 35 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/39b81967/CHANGES.txt -- diff --cc CHANGES.txt index 183d849,c8f7591..873eb78 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,37 -1,20 +1,39 @@@ -2.0.10 +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) +Merged from 2.0: + * Throw EOFException if we run out of chunks in compressed datafile +(CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) +Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226) http://git-wip-us.apache.org/repos/asf/cassandra/blob/39b81967/test/unit/org/apache/cassandra/streaming/compress/CompressedInputStreamTest.java --
[jira] [Commented] (CASSANDRA-7797) Cannot alter ReversedType(DateType) clustering column to ReversedType(TimestampType)
[ https://issues.apache.org/jira/browse/CASSANDRA-7797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103495#comment-14103495 ] Sylvain Lebresne commented on CASSANDRA-7797: - +1 Cannot alter ReversedType(DateType) clustering column to ReversedType(TimestampType) Key: CASSANDRA-7797 URL: https://issues.apache.org/jira/browse/CASSANDRA-7797 Project: Cassandra Issue Type: Bug Components: Core Reporter: Tyler Hobbs Assignee: Tyler Hobbs Fix For: 2.0.10, 2.1.0 Attachments: 7797.txt ReversedType doesn't override {{AbstractType.isCompatibleWith()}}, so {{ReversedType(TimestampType)}} is not considered compatible with {{ReversedType(DateType)}}. It needs to verify that the other type is reversed and that the base types are compatible. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (CASSANDRA-7801) A successful INSERT with CAS does not always store data in the DB after a DELETE
Martin Fransson created CASSANDRA-7801: -- Summary: A successful INSERT with CAS does not always store data in the DB after a DELETE Key: CASSANDRA-7801 URL: https://issues.apache.org/jira/browse/CASSANDRA-7801 Project: Cassandra Issue Type: Bug Components: Core Environment: PC with Windows 7 and on Linux installation. Have seen the fault on Cassandra 2.0.9 and Cassandra 2.1.0-rc5 Reporter: Martin Fransson Attachments: cas.zip When I run a loop with CQL statements to DELETE, INSERT with CAS and then a GET. The INSERT opertion is successful (Applied), but no data is stored in the database. I have checked the database manually after the test to verify that the DB is empty. for (int i = 0; i 1; ++i) { try { t.del(); t.cas(); t.select(); } catch (Exception e) { System.err.println(i= + i); e.printStackTrace(); break; } } myCluster = Cluster.builder().addContactPoint(localhost).withPort(12742).build(); mySession = myCluster.connect(); mySession.execute(CREATE KEYSPACE IF NOT EXISTS castest WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };); mySession.execute(CREATE TABLE IF NOT EXISTS castest.users (userid text PRIMARY KEY, name text)); myInsert = mySession.prepare(INSERT INTO castest.users (userid, name) values ('user1', 'calle') IF NOT EXISTS); myDelete = mySession.prepare(DELETE FROM castest.users where userid='user1'); myGet = mySession.prepare(SELECT * FROM castest.users where userid='user1'); } I can reproduce the fault with the attached program on a PC with windows 7. You need a cassandra runing and you need to set the port in the program. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6809) Compressed Commit Log
[ https://issues.apache.org/jira/browse/CASSANDRA-6809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103569#comment-14103569 ] Jason Brown commented on CASSANDRA-6809: bq. we may as well allocate on the sync thread(s) ... Wait, so I'm confused a bit now. Are you still proposing we go with your initial proposal as stated in the first comment of this ticket, with micro-segments and sync threads? Compressed Commit Log - Key: CASSANDRA-6809 URL: https://issues.apache.org/jira/browse/CASSANDRA-6809 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Branimir Lambov Priority: Minor Labels: performance Fix For: 3.0 It seems an unnecessary oversight that we don't compress the commit log. Doing so should improve throughput, but some care will need to be taken to ensure we use as much of a segment as possible. I propose decoupling the writing of the records from the segments. Basically write into a (queue of) DirectByteBuffer, and have the sync thread compress, say, ~64K chunks every X MB written to the CL (where X is ordinarily CLS size), and then pack as many of the compressed chunks into a CLS as possible. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6809) Compressed Commit Log
[ https://issues.apache.org/jira/browse/CASSANDRA-6809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103580#comment-14103580 ] Benedict commented on CASSANDRA-6809: - Per-disk sync threads... Compressed Commit Log - Key: CASSANDRA-6809 URL: https://issues.apache.org/jira/browse/CASSANDRA-6809 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Branimir Lambov Priority: Minor Labels: performance Fix For: 3.0 It seems an unnecessary oversight that we don't compress the commit log. Doing so should improve throughput, but some care will need to be taken to ensure we use as much of a segment as possible. I propose decoupling the writing of the records from the segments. Basically write into a (queue of) DirectByteBuffer, and have the sync thread compress, say, ~64K chunks every X MB written to the CL (where X is ordinarily CLS size), and then pack as many of the compressed chunks into a CLS as possible. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (CASSANDRA-7802) Need to export JVM_OPTS from init.d script
Matt Robenolt created CASSANDRA-7802: Summary: Need to export JVM_OPTS from init.d script Key: CASSANDRA-7802 URL: https://issues.apache.org/jira/browse/CASSANDRA-7802 Project: Cassandra Issue Type: Bug Components: Packaging Environment: Debian/Ubuntu Reporter: Matt Robenolt Priority: Critical Fix For: 2.0.10, 2.1 rc6, 2.0.9 Attachments: 42.diff Since 2.0, the init.d script was refactored and requires JVM variables to be exported for them to actually be picked up and used. In this case, JVM_OPTS never gets exported, so user defined variables from /etc/default/cassandra are never applied. This also affects the latest 2.1 rc, and I assume all previous versions. See: https://github.com/apache/cassandra/pull/42 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7802) Need to export JVM_OPTS from init.d script
[ https://issues.apache.org/jira/browse/CASSANDRA-7802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Robenolt updated CASSANDRA-7802: - Description: Since 2.0, the init.d script was refactored and requires JVM variables to be exported for them to actually be picked up and used. In this case, JVM_OPTS never gets exported, so user defined variables from /etc/default/cassandra are never applied. This also affects the latest 2.1 rc, and I assume all previous versions. Pull request: https://github.com/apache/cassandra/pull/42 Diff: https://github.com/apache/cassandra/pull/42.diff Patch: https://github.com/apache/cassandra/pull/42.patch was: Since 2.0, the init.d script was refactored and requires JVM variables to be exported for them to actually be picked up and used. In this case, JVM_OPTS never gets exported, so user defined variables from /etc/default/cassandra are never applied. This also affects the latest 2.1 rc, and I assume all previous versions. See: https://github.com/apache/cassandra/pull/42 Need to export JVM_OPTS from init.d script -- Key: CASSANDRA-7802 URL: https://issues.apache.org/jira/browse/CASSANDRA-7802 Project: Cassandra Issue Type: Bug Components: Packaging Environment: Debian/Ubuntu Reporter: Matt Robenolt Priority: Critical Labels: patch Fix For: 2.0.9, 2.0.10, 2.1 rc6 Attachments: 42.diff Since 2.0, the init.d script was refactored and requires JVM variables to be exported for them to actually be picked up and used. In this case, JVM_OPTS never gets exported, so user defined variables from /etc/default/cassandra are never applied. This also affects the latest 2.1 rc, and I assume all previous versions. Pull request: https://github.com/apache/cassandra/pull/42 Diff: https://github.com/apache/cassandra/pull/42.diff Patch: https://github.com/apache/cassandra/pull/42.patch -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6809) Compressed Commit Log
[ https://issues.apache.org/jira/browse/CASSANDRA-6809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103622#comment-14103622 ] Jason Brown commented on CASSANDRA-6809: bq. If we're dropping recycling, ... bottlenecking anything. Reread this paragraph several times, now it makes sense. I wasn't thinking about the write perf, necessarily, but about having the file contiguous on disk. However, since the commit log files are, more or less, one-time use (meaning, we're not doing tons of random nor sequential I/O reads on them), I guess worrying about a large contiguous block on disk isn't necessary. bq. Per-disk sync threads I'm still not sure sync threads are totally necessary. If you are worried about the time for the mmap'ed buffers to flush in the same thread that's handling all the CL entry processing + any possible compression or encryption, a simple solution might be to have a sync thread that merely invokes the mmap buffer flush. Thus, the main CL thread(s) can continue processing the new entries and writing to the mmap buffer, but the sync thread eats the cost of the msync. Compressed Commit Log - Key: CASSANDRA-6809 URL: https://issues.apache.org/jira/browse/CASSANDRA-6809 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Branimir Lambov Priority: Minor Labels: performance Fix For: 3.0 It seems an unnecessary oversight that we don't compress the commit log. Doing so should improve throughput, but some care will need to be taken to ensure we use as much of a segment as possible. I propose decoupling the writing of the records from the segments. Basically write into a (queue of) DirectByteBuffer, and have the sync thread compress, say, ~64K chunks every X MB written to the CL (where X is ordinarily CLS size), and then pack as many of the compressed chunks into a CLS as possible. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Comment Edited] (CASSANDRA-6809) Compressed Commit Log
[ https://issues.apache.org/jira/browse/CASSANDRA-6809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103622#comment-14103622 ] Jason Brown edited comment on CASSANDRA-6809 at 8/20/14 8:37 AM: - bq. If we're dropping recycling, ... bottlenecking anything. Reread this paragraph several times, now it makes sense. I wasn't thinking about the write perf, necessarily, but about having the file contiguous on disk. However, since the commit log files are, more or less, one-time use (meaning, we're not doing tons of random nor sequential I/O reads on them), I guess worrying about a large contiguous block on disk isn't necessary. bq. Per-disk sync threads I'm still not sure sync threads, in the manner initially described above, are totally necessary. If you are worried about the time for the mmap'ed buffers to flush in the same thread that's handling all the CL entry processing + any possible compression or encryption, a simple solution might be to have a sync thread that merely invokes the mmap buffer flush. Thus, the main CL thread(s) can continue processing the new entries and writing to the mmap buffer, but the sync thread eats the cost of the msync. was (Author: jasobrown): bq. If we're dropping recycling, ... bottlenecking anything. Reread this paragraph several times, now it makes sense. I wasn't thinking about the write perf, necessarily, but about having the file contiguous on disk. However, since the commit log files are, more or less, one-time use (meaning, we're not doing tons of random nor sequential I/O reads on them), I guess worrying about a large contiguous block on disk isn't necessary. bq. Per-disk sync threads I'm still not sure sync threads are totally necessary. If you are worried about the time for the mmap'ed buffers to flush in the same thread that's handling all the CL entry processing + any possible compression or encryption, a simple solution might be to have a sync thread that merely invokes the mmap buffer flush. Thus, the main CL thread(s) can continue processing the new entries and writing to the mmap buffer, but the sync thread eats the cost of the msync. Compressed Commit Log - Key: CASSANDRA-6809 URL: https://issues.apache.org/jira/browse/CASSANDRA-6809 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Branimir Lambov Priority: Minor Labels: performance Fix For: 3.0 It seems an unnecessary oversight that we don't compress the commit log. Doing so should improve throughput, but some care will need to be taken to ensure we use as much of a segment as possible. I propose decoupling the writing of the records from the segments. Basically write into a (queue of) DirectByteBuffer, and have the sync thread compress, say, ~64K chunks every X MB written to the CL (where X is ordinarily CLS size), and then pack as many of the compressed chunks into a CLS as possible. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6809) Compressed Commit Log
[ https://issues.apache.org/jira/browse/CASSANDRA-6809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103626#comment-14103626 ] Jason Brown commented on CASSANDRA-6809: If we did try an async flush of the buffers in a sync thread, I think it would be instructive to actually measure that it is demonstratively beneficial, rather than assuming that it is. Compressed Commit Log - Key: CASSANDRA-6809 URL: https://issues.apache.org/jira/browse/CASSANDRA-6809 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Branimir Lambov Priority: Minor Labels: performance Fix For: 3.0 It seems an unnecessary oversight that we don't compress the commit log. Doing so should improve throughput, but some care will need to be taken to ensure we use as much of a segment as possible. I propose decoupling the writing of the records from the segments. Basically write into a (queue of) DirectByteBuffer, and have the sync thread compress, say, ~64K chunks every X MB written to the CL (where X is ordinarily CLS size), and then pack as many of the compressed chunks into a CLS as possible. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Comment Edited] (CASSANDRA-6809) Compressed Commit Log
[ https://issues.apache.org/jira/browse/CASSANDRA-6809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103626#comment-14103626 ] Jason Brown edited comment on CASSANDRA-6809 at 8/20/14 8:42 AM: - If we did try an async flush of the buffers in a sync thread, I think it would be instructive to actually measure that it is demonstratively beneficial, rather than assuming that it is. I'm not immediately sure how to measure that, but it's near 2am and coffee time doesn't begin for several more hours. was (Author: jasobrown): If we did try an async flush of the buffers in a sync thread, I think it would be instructive to actually measure that it is demonstratively beneficial, rather than assuming that it is. Compressed Commit Log - Key: CASSANDRA-6809 URL: https://issues.apache.org/jira/browse/CASSANDRA-6809 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Branimir Lambov Priority: Minor Labels: performance Fix For: 3.0 It seems an unnecessary oversight that we don't compress the commit log. Doing so should improve throughput, but some care will need to be taken to ensure we use as much of a segment as possible. I propose decoupling the writing of the records from the segments. Basically write into a (queue of) DirectByteBuffer, and have the sync thread compress, say, ~64K chunks every X MB written to the CL (where X is ordinarily CLS size), and then pack as many of the compressed chunks into a CLS as possible. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-7795) Make StreamReceiveTask thread safe and GC friendly
[ https://issues.apache.org/jira/browse/CASSANDRA-7795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103634#comment-14103634 ] Benedict commented on CASSANDRA-7795: - LGTM, +1 Might want to have a quick look at StreamTask.prepare(), which calls .maybeCompleted() without holding the object monitor. which may be a very very unlikely race condition. Make StreamReceiveTask thread safe and GC friendly -- Key: CASSANDRA-7795 URL: https://issues.apache.org/jira/browse/CASSANDRA-7795 Project: Cassandra Issue Type: Bug Reporter: Yuki Morishita Assignee: Yuki Morishita Priority: Minor Labels: streaming Fix For: 2.0.10 Attachments: 0001-Make-StreamReceiveTask-thread-safe-and-gc-friendly.patch StreamReceiveTask is not thread safe when stream session is aborted and completion task is running. Also, StreamReceiveTask keeps references to SSTableWriter until completion task runs and session completes. Currently, StreamReceiveTask's completion task runs on StorageService's NonPeriodicTask and it may take longer to execute. Patch attached to fix above. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-7801) A successful INSERT with CAS does not always store data in the DB after a DELETE
[ https://issues.apache.org/jira/browse/CASSANDRA-7801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103659#comment-14103659 ] Sylvain Lebresne commented on CASSANDRA-7801: - Is your test on a single node Cassandra cluster? A successful INSERT with CAS does not always store data in the DB after a DELETE Key: CASSANDRA-7801 URL: https://issues.apache.org/jira/browse/CASSANDRA-7801 Project: Cassandra Issue Type: Bug Components: Core Environment: PC with Windows 7 and on Linux installation. Have seen the fault on Cassandra 2.0.9 and Cassandra 2.1.0-rc5 Reporter: Martin Fransson Attachments: cas.zip When I run a loop with CQL statements to DELETE, INSERT with CAS and then a GET. The INSERT opertion is successful (Applied), but no data is stored in the database. I have checked the database manually after the test to verify that the DB is empty. for (int i = 0; i 1; ++i) { try { t.del(); t.cas(); t.select(); } catch (Exception e) { System.err.println(i= + i); e.printStackTrace(); break; } } myCluster = Cluster.builder().addContactPoint(localhost).withPort(12742).build(); mySession = myCluster.connect(); mySession.execute(CREATE KEYSPACE IF NOT EXISTS castest WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };); mySession.execute(CREATE TABLE IF NOT EXISTS castest.users (userid text PRIMARY KEY, name text)); myInsert = mySession.prepare(INSERT INTO castest.users (userid, name) values ('user1', 'calle') IF NOT EXISTS); myDelete = mySession.prepare(DELETE FROM castest.users where userid='user1'); myGet = mySession.prepare(SELECT * FROM castest.users where userid='user1'); } I can reproduce the fault with the attached program on a PC with windows 7. You need a cassandra runing and you need to set the port in the program. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6809) Compressed Commit Log
[ https://issues.apache.org/jira/browse/CASSANDRA-6809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103661#comment-14103661 ] Benedict commented on CASSANDRA-6809: - bq. Thus, the main CL thread(s) can continue processing the new entries and writing to the mmap buffer, I think you're still thinking in 2.0 terms. In 2.1 the mutation threads write to the commit log buffer directly. We will need these buffers to be purely in memory (not mmapped) and then passed to the sync threads when ready for writing to be compressed and written to disk. bq. I wasn't thinking about the write perf, necessarily, but about having the file contiguous on disk I'm not convinced this will behave any differently performance-wise (i.e. if we were to preallocate the file's size), however we don't now know the size of the file we'll be writing, so pre-allocating doesn't really help much anymore. bq. a simple solution might be to have a sync thread that merely invokes the mmap buffer flush But this flush is synchronous? Specifically, we want multiple to be in flight at once. I also do not think there's any benefit to using mmap any more, since you bring it up. We should switch to regular output streams, so that we can simply wrap it in a compressed output stream. If you mean to start using async IO in Java, this isn't really any superior here - it still involves extra threads with a hidden thread pool, and extra (IMO) complexity beyond simply performing it on the relevant thread, but also would involve compressing the entire segment before writing to the file, which introduces extra latency (or having a complex to-and-fro shuttle compressed data to an async sink, waiting for result, etc), for no benefit. Compressed Commit Log - Key: CASSANDRA-6809 URL: https://issues.apache.org/jira/browse/CASSANDRA-6809 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Branimir Lambov Priority: Minor Labels: performance Fix For: 3.0 It seems an unnecessary oversight that we don't compress the commit log. Doing so should improve throughput, but some care will need to be taken to ensure we use as much of a segment as possible. I propose decoupling the writing of the records from the segments. Basically write into a (queue of) DirectByteBuffer, and have the sync thread compress, say, ~64K chunks every X MB written to the CL (where X is ordinarily CLS size), and then pack as many of the compressed chunks into a CLS as possible. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-7796) Stop inheriting liveRatio/computedAt from previous memtables
[ https://issues.apache.org/jira/browse/CASSANDRA-7796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103660#comment-14103660 ] Aleksey Yeschenko commented on CASSANDRA-7796: -- Yes, I'm sure. liveRatio is inherently flawed, so what 6945 and this one are about are about handling pathological scenarios. Pre-6945 if we happened to calculate the ratio on an empty-ish memtable at a reasonable time since CF init, we'd be screwed for good, for long. Post-6945, to a lesser extent, you can still get similar bad behavior if you inherit a crazy recently calculated liveRatio with high-ish calculatedAt. IMO it's preferable to start with the default ratio, guaranteed to be non-crazy. For the same reason I'm against inheriting just the liveRatio w/out computedAt. Now, there are ways to be smarter about it, but I'm uncomfortable with experimenting at this point. I'd rather just rollback this part of 6945. And the only way to truly fix this is to upgrade to 2.1 :\ Stop inheriting liveRatio/computedAt from previous memtables Key: CASSANDRA-7796 URL: https://issues.apache.org/jira/browse/CASSANDRA-7796 Project: Cassandra Issue Type: Bug Reporter: Aleksey Yeschenko Assignee: Aleksey Yeschenko Priority: Minor Fix For: 2.0.10 Attachments: 7796.txt CASSANDRA-6945 helped to reduce the risk of calculating an outlier liveRatio value, and having to stick with it for a long time, by making liveRatio per-memtable and not per-cf. The added optimization of inheriting liveRatio/calculatedAt to minimize recalculations, however, took us a step back to before CASSANDRA-6945. I suggest we get rid of inheriting the old values altogether, but reduce the rate of recalculation by demanding 10x increase in ops to trigger recalc, instead of the previous 2x. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-7796) Stop inheriting liveRatio/computedAt from previous memtables
[ https://issues.apache.org/jira/browse/CASSANDRA-7796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103665#comment-14103665 ] Benedict commented on CASSANDRA-7796: - My concern is I'm pretty certain we encountered a user on the mailing list OOMing their servers by outpacing the live ratio calculation, which is why we introduced this. Stop inheriting liveRatio/computedAt from previous memtables Key: CASSANDRA-7796 URL: https://issues.apache.org/jira/browse/CASSANDRA-7796 Project: Cassandra Issue Type: Bug Reporter: Aleksey Yeschenko Assignee: Aleksey Yeschenko Priority: Minor Fix For: 2.0.10 Attachments: 7796.txt CASSANDRA-6945 helped to reduce the risk of calculating an outlier liveRatio value, and having to stick with it for a long time, by making liveRatio per-memtable and not per-cf. The added optimization of inheriting liveRatio/calculatedAt to minimize recalculations, however, took us a step back to before CASSANDRA-6945. I suggest we get rid of inheriting the old values altogether, but reduce the rate of recalculation by demanding 10x increase in ops to trigger recalc, instead of the previous 2x. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Comment Edited] (CASSANDRA-6809) Compressed Commit Log
[ https://issues.apache.org/jira/browse/CASSANDRA-6809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103680#comment-14103680 ] Jason Brown edited comment on CASSANDRA-6809 at 8/20/14 9:35 AM: - bq. I think you're still thinking in 2.0 terms True, I haven't caught up with the CL changes for 2.1, but in my defense, I need to ship something ASAP on 2.0 :). Will do my homework on 2.1. bq. I'm not convinced this will behave any differently performance-wise Yeah, me neither. Perhaps my meandering prose didn't express that I think we can retire the pre-allocate with the segment recycle. bq. mmap We can still use mmap with OutputStream, in fact I've done it already on my local for the encrypted commit logs. However, we should evaluate if we want the mmap functionality. I haven't thought enough about it to have a strong opinion. Either way, you still go through the page cache, which is the part I'd like to avoid. bq. If you mean to start using async IO in Java ... Nope, at least, not here :) was (Author: jasobrown): bq. I think you're still thinking in 2.0 terms True, I haven't caught up with the CL changes for 2.1, but in my defense, I need to ship something ASAP on 2.0 :). Will do my homework on 2.1. bq. I'm not convinced this will behave any differently performance-wise Yeah, me neither. Perhaps my meandering prose didn't express that I think we can retire the pre-allocate with the segment recycle. bq. mmap We can still use mmap with OutputStream, in fact I've done it already on my local hacking. However, we should evaluate if we want the mmap functionality. I haven't thought enough about it to have a strong opinion. Either way, you still go through the page cache, which is the part I'd like to avoid. bq. If you mean to start using async IO in Java ... Nope, at least, not here :) Compressed Commit Log - Key: CASSANDRA-6809 URL: https://issues.apache.org/jira/browse/CASSANDRA-6809 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Branimir Lambov Priority: Minor Labels: performance Fix For: 3.0 It seems an unnecessary oversight that we don't compress the commit log. Doing so should improve throughput, but some care will need to be taken to ensure we use as much of a segment as possible. I propose decoupling the writing of the records from the segments. Basically write into a (queue of) DirectByteBuffer, and have the sync thread compress, say, ~64K chunks every X MB written to the CL (where X is ordinarily CLS size), and then pack as many of the compressed chunks into a CLS as possible. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6809) Compressed Commit Log
[ https://issues.apache.org/jira/browse/CASSANDRA-6809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103680#comment-14103680 ] Jason Brown commented on CASSANDRA-6809: bq. I think you're still thinking in 2.0 terms True, I haven't caught up with the CL changes for 2.1, but in my defense, I need to ship something ASAP on 2.0 :). Will do my homework on 2.1. bq. I'm not convinced this will behave any differently performance-wise Yeah, me neither. Perhaps my meandering prose didn't express that I think we can retire the pre-allocate with the segment recycle. bq. mmap We can still use mmap with OutputStream, in fact I've done it already on my local hacking. However, we should evaluate if we want the mmap functionality. I haven't thought enough about it to have a strong opinion. Either way, you still go through the page cache, which is the part I'd like to avoid. bq. If you mean to start using async IO in Java ... Nope, at least, not here :) Compressed Commit Log - Key: CASSANDRA-6809 URL: https://issues.apache.org/jira/browse/CASSANDRA-6809 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Branimir Lambov Priority: Minor Labels: performance Fix For: 3.0 It seems an unnecessary oversight that we don't compress the commit log. Doing so should improve throughput, but some care will need to be taken to ensure we use as much of a segment as possible. I propose decoupling the writing of the records from the segments. Basically write into a (queue of) DirectByteBuffer, and have the sync thread compress, say, ~64K chunks every X MB written to the CL (where X is ordinarily CLS size), and then pack as many of the compressed chunks into a CLS as possible. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6809) Compressed Commit Log
[ https://issues.apache.org/jira/browse/CASSANDRA-6809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103687#comment-14103687 ] Benedict commented on CASSANDRA-6809: - Sounds like we're approximately in agreement then :-) FTR, I don't really want to incorporate these changes pre-3.0 on the mainline (though doesn't sound like you're suggesting it)... Compressed Commit Log - Key: CASSANDRA-6809 URL: https://issues.apache.org/jira/browse/CASSANDRA-6809 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Branimir Lambov Priority: Minor Labels: performance Fix For: 3.0 It seems an unnecessary oversight that we don't compress the commit log. Doing so should improve throughput, but some care will need to be taken to ensure we use as much of a segment as possible. I propose decoupling the writing of the records from the segments. Basically write into a (queue of) DirectByteBuffer, and have the sync thread compress, say, ~64K chunks every X MB written to the CL (where X is ordinarily CLS size), and then pack as many of the compressed chunks into a CLS as possible. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7606) Add IF [NOT] EXISTS to CREATE/DROP trigger
[ https://issues.apache.org/jira/browse/CASSANDRA-7606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-7606: -- Attachment: CASSANDRA-7606.txt Add IF [NOT] EXISTS to CREATE/DROP trigger -- Key: CASSANDRA-7606 URL: https://issues.apache.org/jira/browse/CASSANDRA-7606 Project: Cassandra Issue Type: Improvement Reporter: Robert Stupp Assignee: Benjamin Lerer Priority: Minor Labels: cql Fix For: 2.1.1 Attachments: CASSANDRA-7606.txt All CREATE/DROP statements support IF [NOT] EXISTS - except CREATE/DROP trigger. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7606) Add IF [NOT] EXISTS to CREATE/DROP trigger
[ https://issues.apache.org/jira/browse/CASSANDRA-7606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-7606: -- Labels: cql docs (was: cql) Add IF [NOT] EXISTS to CREATE/DROP trigger -- Key: CASSANDRA-7606 URL: https://issues.apache.org/jira/browse/CASSANDRA-7606 Project: Cassandra Issue Type: Improvement Reporter: Robert Stupp Assignee: Benjamin Lerer Priority: Minor Labels: cql, docs Fix For: 2.1.1 Attachments: CASSANDRA-7606.txt All CREATE/DROP statements support IF [NOT] EXISTS - except CREATE/DROP trigger. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-7801) A successful INSERT with CAS does not always store data in the DB after a DELETE
[ https://issues.apache.org/jira/browse/CASSANDRA-7801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103733#comment-14103733 ] Martin Fransson commented on CASSANDRA-7801: I have tested on a single node. A successful INSERT with CAS does not always store data in the DB after a DELETE Key: CASSANDRA-7801 URL: https://issues.apache.org/jira/browse/CASSANDRA-7801 Project: Cassandra Issue Type: Bug Components: Core Environment: PC with Windows 7 and on Linux installation. Have seen the fault on Cassandra 2.0.9 and Cassandra 2.1.0-rc5 Reporter: Martin Fransson Attachments: cas.zip When I run a loop with CQL statements to DELETE, INSERT with CAS and then a GET. The INSERT opertion is successful (Applied), but no data is stored in the database. I have checked the database manually after the test to verify that the DB is empty. for (int i = 0; i 1; ++i) { try { t.del(); t.cas(); t.select(); } catch (Exception e) { System.err.println(i= + i); e.printStackTrace(); break; } } myCluster = Cluster.builder().addContactPoint(localhost).withPort(12742).build(); mySession = myCluster.connect(); mySession.execute(CREATE KEYSPACE IF NOT EXISTS castest WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };); mySession.execute(CREATE TABLE IF NOT EXISTS castest.users (userid text PRIMARY KEY, name text)); myInsert = mySession.prepare(INSERT INTO castest.users (userid, name) values ('user1', 'calle') IF NOT EXISTS); myDelete = mySession.prepare(DELETE FROM castest.users where userid='user1'); myGet = mySession.prepare(SELECT * FROM castest.users where userid='user1'); } I can reproduce the fault with the attached program on a PC with windows 7. You need a cassandra runing and you need to set the port in the program. -- This message was sent by Atlassian JIRA (v6.2#6252)
git commit: Anticompact sstables as groups
Repository: cassandra Updated Branches: refs/heads/trunk 060c7961d - 37f517593 Anticompact sstables as groups Patch by Russell Spitzer; reviewed by marcuse for CASSANDRA-6851 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/37f51759 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/37f51759 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/37f51759 Branch: refs/heads/trunk Commit: 37f5175935a37ce2c005335c2f486efb827b6eba Parents: 060c796 Author: Russell Spitzer russell.spit...@gmail.com Authored: Wed Aug 20 13:27:52 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Aug 20 13:27:52 2014 +0200 -- CHANGES.txt | 1 + .../compaction/AbstractCompactionStrategy.java | 31 .../db/compaction/CompactionManager.java| 174 +-- .../compaction/LeveledCompactionStrategy.java | 57 +- .../db/compaction/AntiCompactionTest.java | 96 +- .../LeveledCompactionStrategyTest.java | 61 ++- 6 files changed, 358 insertions(+), 62 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/37f51759/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index d1dedbf..80c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0 + * Do anticompaction in groups (CASSANDRA-6851) * Verify that UDF class methods are static (CASSANDRA-7781) * Support pure user-defined functions (CASSANDRA-7395) * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) http://git-wip-us.apache.org/repos/asf/cassandra/blob/37f51759/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java -- diff --git a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java index 1b7786e..28ab84e 100644 --- a/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java +++ b/src/java/org/apache/cassandra/db/compaction/AbstractCompactionStrategy.java @@ -399,4 +399,35 @@ public abstract class AbstractCompactionStrategy return optionValue == null || Boolean.parseBoolean(optionValue); } + + +/** + * Method for grouping similar SSTables together, This will be used by + * anti-compaction to determine which SSTables should be anitcompacted + * as a group. If a given compaction strategy creates sstables which + * cannot be merged due to some constraint it must override this method. + */ +public CollectionCollectionSSTableReader groupSSTablesForAntiCompaction(CollectionSSTableReader sstablesToGroup) +{ +int groupSize = 2; +ListSSTableReader sortedSSTablesToGroup = new ArrayList(sstablesToGroup); +Collections.sort(sortedSSTablesToGroup, SSTableReader.sstableComparator); + +CollectionCollectionSSTableReader groupedSSTables = new ArrayList(); +CollectionSSTableReader currGroup = new ArrayList(); + +for (SSTableReader sstable : sortedSSTablesToGroup) +{ +currGroup.add(sstable); +if (currGroup.size() == groupSize) +{ +groupedSSTables.add(currGroup); +currGroup = new ArrayList(); +} +} + +if (currGroup.size() != 0) +groupedSSTables.add(currGroup); +return groupedSSTables; +} } http://git-wip-us.apache.org/repos/asf/cassandra/blob/37f51759/src/java/org/apache/cassandra/db/compaction/CompactionManager.java -- diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java index e578ddf..5af7139 100644 --- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java +++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java @@ -52,6 +52,7 @@ import com.google.common.collect.Multimap; import com.google.common.collect.Multiset; import com.google.common.collect.Sets; import com.google.common.util.concurrent.RateLimiter; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -397,7 +398,7 @@ public class CompactionManager implements CompactionManagerMBean CollectionSSTableReader validatedForRepair, long repairedAt) throws InterruptedException, ExecutionException, IOException { -logger.info(Starting anticompaction); +logger.info(Starting anticompaction for {}/{}, cfs.keyspace.getName(),
[jira] [Resolved] (CASSANDRA-6851) Improve anticompaction after incremental repair
[ https://issues.apache.org/jira/browse/CASSANDRA-6851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcus Eriksson resolved CASSANDRA-6851. Resolution: Fixed committed, thanks! Improve anticompaction after incremental repair --- Key: CASSANDRA-6851 URL: https://issues.apache.org/jira/browse/CASSANDRA-6851 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Marcus Eriksson Assignee: Russell Alexander Spitzer Priority: Minor Labels: compaction, lhf Fix For: 3.0 After an incremental repair we iterate over all sstables and split them in two parts, one containing the repaired data and one the unrepaired. We could in theory double the number of sstables on a node. To avoid this we could make anticompaction also do a compaction, for example, if we are to anticompact 10 sstables, we could anticompact those to 2. Note that we need to avoid creating too big sstables though, if we anticompact all sstables on a node it would essentially be a major compaction. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Assigned] (CASSANDRA-7145) FileNotFoundException during compaction
[ https://issues.apache.org/jira/browse/CASSANDRA-7145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcus Eriksson reassigned CASSANDRA-7145: -- Assignee: Marcus Eriksson FileNotFoundException during compaction --- Key: CASSANDRA-7145 URL: https://issues.apache.org/jira/browse/CASSANDRA-7145 Project: Cassandra Issue Type: Bug Environment: CentOS 6.3, Datastax Enterprise 4.0.1 (Cassandra 2.0.5), Java 1.7.0_55 Reporter: PJ Assignee: Marcus Eriksson Attachments: compaction - FileNotFoundException.txt, repair - RuntimeException.txt, startup - AssertionError.txt I can't finish any compaction because my nodes always throw a FileNotFoundException. I've already tried the following but nothing helped: 1. nodetool flush 2. nodetool repair (ends with RuntimeException; see attachment) 3. node restart (via dse cassandra-stop) Whenever I restart the nodes, another type of exception is logged (see attachment) somewhere near the end of startup process. This particular exception doesn't seem to be critical because the nodes still manage to finish the startup and become online. I don't have specific steps to reproduce the problem that I'm experiencing with compaction and repair. I'm in the middle of migrating 4.8 billion rows from MySQL via SSTableLoader. Some things that may or may not be relevant: 1. I didn't drop and recreate the keyspace (so probably not related to CASSANDRA-4857) 2. I do the bulk-loading in batches of 1 to 20 millions rows. When a batch reaches 100% total progress (i.e. starts to build secondary index), I kill the sstableloader process and cancel the index build 3. I restart the nodes occasionally. It's possible that there is an on-going compaction during one of those restarts. Related StackOverflow question (mine): http://stackoverflow.com/questions/23435847/filenotfoundexception-during-compaction -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-7796) Stop inheriting liveRatio/computedAt from previous memtables
[ https://issues.apache.org/jira/browse/CASSANDRA-7796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103797#comment-14103797 ] Aleksey Yeschenko commented on CASSANDRA-7796: -- It's not why we introduced this, actually. Moving liveRatio to per-Memtable from per-CF was done to avoid getting stuck forever with an outlier liveRatio value. Inheriting them was an optimisation to reduce the number of recalculations themselves, but in retrospect it does sort of go against the very reason 6945 was introduced. That, and liveRatioComputedAt is really liveRatioScheduledToBeComputedAt. We can track the actual liveRatioComputedAt, or only inherit the previous ratio if its value is sane enough, but at this point in 2.0 cycle I'm uncomfortable with that. Rolling back the inheritance part of 6945 (what this issue is about) I am comfortable with. Stop inheriting liveRatio/computedAt from previous memtables Key: CASSANDRA-7796 URL: https://issues.apache.org/jira/browse/CASSANDRA-7796 Project: Cassandra Issue Type: Bug Reporter: Aleksey Yeschenko Assignee: Aleksey Yeschenko Priority: Minor Fix For: 2.0.10 Attachments: 7796.txt CASSANDRA-6945 helped to reduce the risk of calculating an outlier liveRatio value, and having to stick with it for a long time, by making liveRatio per-memtable and not per-cf. The added optimization of inheriting liveRatio/calculatedAt to minimize recalculations, however, took us a step back to before CASSANDRA-6945. I suggest we get rid of inheriting the old values altogether, but reduce the rate of recalculation by demanding 10x increase in ops to trigger recalc, instead of the previous 2x. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (CASSANDRA-7803) When compaction is interrupted, it leaves locked, undeletable files
Scooletz created CASSANDRA-7803: --- Summary: When compaction is interrupted, it leaves locked, undeletable files Key: CASSANDRA-7803 URL: https://issues.apache.org/jira/browse/CASSANDRA-7803 Project: Cassandra Issue Type: Bug Components: Core Environment: RedHat, xfs4, JNA enabled, JBOD, Reporter: Scooletz During tests of new features of 2.1 like: - incremental repairs - leveled compaction I interrupted a compaction, which left the following ERROR in the _system.log_ {quote} org.apache.cassandra.db.compaction.CompactionInterruptedException: Compaction interrupted: Compaction@152e6e70-1975-11e4-ba09-61f0d75c60c6(xx, xxx, 378505918/1993581634)bytes at org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:174) at org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:74) at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:235) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_09] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_09] at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_09] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09] {quote} Right after that, a cascade of reoccurring errors was emitted: {quote} ERROR [NonPeriodicTasks:1] 2014-08-19 13:38:41,258 SSTableDeletingTask.java:81 - Unable to delete /grid/data04/cassandra/data/xx/xxx-152e6e70197511e4ba0961f0d75c60c6/xx-xxx-ka-55058-Data.db (it will be removed on server restart; we'll also retry after GC) {quote} which made this node blinking (noted from the other nodes gossiper log entries). After restart, the node is healthy and fully operational. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7803) When compaction is interrupted, it leaves locked, undeletable files
[ https://issues.apache.org/jira/browse/CASSANDRA-7803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Scooletz updated CASSANDRA-7803: Description: During tests of new features of 2.1 like: - incremental repairs - leveled compaction I interrupted a compaction, which left the following ERROR in the _system.log_ {quote} org.apache.cassandra.db.compaction.CompactionInterruptedException: Compaction interrupted: Compaction@152e6e70-1975-11e4-ba09-61f0d75c60c6(xx, xxx, 378505918/1993581634)bytes at org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:174) at org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:74) at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:235) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_09] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_09] at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_09] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09] {quote} Right after that, a cascade of reoccurring errors was being emitted till the restart: {quote} ERROR [NonPeriodicTasks:1] 2014-08-19 13:38:41,258 SSTableDeletingTask.java:81 - Unable to delete /grid/data04/cassandra/data/xx/xxx-152e6e70197511e4ba0961f0d75c60c6/xx-xxx-ka-55058-Data.db (it will be removed on server restart; we'll also retry after GC) {quote} which made this node blinking (noted from the other nodes gossiper log entries). After restart, the node is healthy and fully operational. was: During tests of new features of 2.1 like: - incremental repairs - leveled compaction I interrupted a compaction, which left the following ERROR in the _system.log_ {quote} org.apache.cassandra.db.compaction.CompactionInterruptedException: Compaction interrupted: Compaction@152e6e70-1975-11e4-ba09-61f0d75c60c6(xx, xxx, 378505918/1993581634)bytes at org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:174) at org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:74) at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:235) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_09] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_09] at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_09] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09] {quote} Right after that, a cascade of reoccurring errors was emitted: {quote} ERROR [NonPeriodicTasks:1] 2014-08-19 13:38:41,258 SSTableDeletingTask.java:81 - Unable to delete /grid/data04/cassandra/data/xx/xxx-152e6e70197511e4ba0961f0d75c60c6/xx-xxx-ka-55058-Data.db (it will be removed on server restart; we'll also retry after GC) {quote} which made this node blinking (noted from the other nodes gossiper log entries). After restart, the node is healthy and fully operational. When compaction is interrupted, it leaves locked, undeletable files --- Key: CASSANDRA-7803 URL: https://issues.apache.org/jira/browse/CASSANDRA-7803 Project: Cassandra Issue Type: Bug Components: Core Environment: RedHat, xfs4, JNA enabled, JBOD, Reporter: Scooletz Labels: Comparator During tests of new features of 2.1 like: - incremental repairs - leveled compaction I interrupted a compaction, which left the following ERROR in the _system.log_ {quote} org.apache.cassandra.db.compaction.CompactionInterruptedException: Compaction interrupted:
[jira] [Commented] (CASSANDRA-7606) Add IF [NOT] EXISTS to CREATE/DROP trigger
[ https://issues.apache.org/jira/browse/CASSANDRA-7606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103809#comment-14103809 ] Sylvain Lebresne commented on CASSANDRA-7606: - [~snazy] want to have a shot at the review? Add IF [NOT] EXISTS to CREATE/DROP trigger -- Key: CASSANDRA-7606 URL: https://issues.apache.org/jira/browse/CASSANDRA-7606 Project: Cassandra Issue Type: Improvement Reporter: Robert Stupp Assignee: Benjamin Lerer Priority: Minor Labels: cql, docs Fix For: 2.1.1 Attachments: CASSANDRA-7606.txt All CREATE/DROP statements support IF [NOT] EXISTS - except CREATE/DROP trigger. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7016) can't map/reduce over subset of rows with cql
[ https://issues.apache.org/jira/browse/CASSANDRA-7016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-7016: -- Attachment: CASSANDRA-7016-V2.txt I forgot to modify the SelectStatement execute method in the previous patch. can't map/reduce over subset of rows with cql - Key: CASSANDRA-7016 URL: https://issues.apache.org/jira/browse/CASSANDRA-7016 Project: Cassandra Issue Type: Bug Components: Core, Hadoop Reporter: Jonathan Halliday Assignee: Benjamin Lerer Priority: Minor Labels: cql Fix For: 2.1.1 Attachments: CASSANDRA-7016-V2.txt, CASSANDRA-7016.txt select ... where token(k) x and token(k) = y and k in (a,b) allow filtering; This fails on 2.0.6: can't restrict k by more than one relation. In the context of map/reduce (hence the token range) I want to map over only a subset of the keys (hence the 'in'). Pushing the 'in' filter down to cql is substantially cheaper than pulling all rows to the client and then discarding most of them. Currently this is possible only if the hadoop integration code is altered to apply the AND on the client side and use cql that contains only the resulting filtered 'in' set. The problem is not hadoop specific though, so IMO it should really be solved in cql not the hadoop integration code. Most restrictions on cql syntax seem to exist to prevent unduly expensive queries. This one seems to be doing the opposite. Edit: on further thought and with reference to the code in SelectStatement$RawStatement, it seems to me that token(k) and k should be considered distinct entities for the purposes of processing restrictions. That is, no restriction on the token should conflict with a restriction on the raw key. That way any monolithic query in terms of k and be decomposed into parallel chunks over the token range for the purposes of map/reduce processing simply by appending a 'and where token(k)...' clause to the exiting 'where k ...'. -- This message was sent by Atlassian JIRA (v6.2#6252)
git commit: Stop inheriting liveRatio and liveRatioComputedAt from previous memtables
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 76adf0e12 - eeb0d4c90 Stop inheriting liveRatio and liveRatioComputedAt from previous memtables patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for CASSANDRA-7796 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/eeb0d4c9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/eeb0d4c9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/eeb0d4c9 Branch: refs/heads/cassandra-2.0 Commit: eeb0d4c90198b14113ee094587cf0eacceb2b96f Parents: 76adf0e Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 15:40:27 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 15:40:27 2014 +0300 -- CHANGES.txt | 2 ++ src/java/org/apache/cassandra/db/DataTracker.java | 6 +++--- src/java/org/apache/cassandra/db/Memtable.java| 14 +++--- 3 files changed, 8 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index c8f7591..2b2930e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Stop inheriting liveRatio and liveRatioComputedAt from previous + memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) * Throw InvalidRequestException when queries contain relations on entire http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/src/java/org/apache/cassandra/db/DataTracker.java -- diff --git a/src/java/org/apache/cassandra/db/DataTracker.java b/src/java/org/apache/cassandra/db/DataTracker.java index 088255e..05ee13e 100644 --- a/src/java/org/apache/cassandra/db/DataTracker.java +++ b/src/java/org/apache/cassandra/db/DataTracker.java @@ -109,7 +109,7 @@ public class DataTracker public Memtable switchMemtable() { // atomically change the current memtable -Memtable newMemtable = new Memtable(cfstore, view.get().memtable); +Memtable newMemtable = new Memtable(cfstore); Memtable toFlushMemtable; View currentView, newView; do @@ -132,7 +132,7 @@ public class DataTracker { assert !cfstore.keyspace.metadata.durableWrites; -Memtable newMemtable = new Memtable(cfstore, view.get().memtable); +Memtable newMemtable = new Memtable(cfstore); View currentView, newView; do { @@ -323,7 +323,7 @@ public class DataTracker /** (Re)initializes the tracker, purging all references. */ void init() { -view.set(new View(new Memtable(cfstore, null), +view.set(new View(new Memtable(cfstore), Collections.MemtableemptySet(), Collections.SSTableReaderemptySet(), Collections.SSTableReaderemptySet(), http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/src/java/org/apache/cassandra/db/Memtable.java -- diff --git a/src/java/org/apache/cassandra/db/Memtable.java b/src/java/org/apache/cassandra/db/Memtable.java index 20adeb7..f9a6719 100644 --- a/src/java/org/apache/cassandra/db/Memtable.java +++ b/src/java/org/apache/cassandra/db/Memtable.java @@ -120,20 +120,12 @@ public class Memtable // memtable was created with the new or old comparator. public final AbstractType initialComparator; -public Memtable(ColumnFamilyStore cfs, Memtable previous) +public Memtable(ColumnFamilyStore cfs) { this.cfs = cfs; this.initialComparator = cfs.metadata.comparator; this.cfs.scheduleFlush(); -// Inherit liveRatio and liveRatioCompareAt from the previous memtable, if available, -// to minimise recalculation frequency as much as possible. -if (previous != null) -{ -liveRatio = previous.liveRatio; -liveRatioComputedAt.set(previous.liveRatioComputedAt.get() / 4); -} - CallableSetObject provider = new CallableSetObject() { public SetObject call() throws Exception @@ -175,12 +167,12 @@ public class Memtable public void maybeUpdateLiveRatio() { -// recompute liveRatio, if we have doubled the number of ops since last calculated +// recompute liveRatio, if we have increased the number of ops 10x since last calculated while (true) { long last = liveRatioComputedAt.get(); long operations = currentOperations.get(); -if (operations = 2L *
[1/2] git commit: Stop inheriting liveRatio and liveRatioComputedAt from previous memtables
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1.0 39b81967f - c8a8bfc1e Stop inheriting liveRatio and liveRatioComputedAt from previous memtables patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for CASSANDRA-7796 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/eeb0d4c9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/eeb0d4c9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/eeb0d4c9 Branch: refs/heads/cassandra-2.1.0 Commit: eeb0d4c90198b14113ee094587cf0eacceb2b96f Parents: 76adf0e Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 15:40:27 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 15:40:27 2014 +0300 -- CHANGES.txt | 2 ++ src/java/org/apache/cassandra/db/DataTracker.java | 6 +++--- src/java/org/apache/cassandra/db/Memtable.java| 14 +++--- 3 files changed, 8 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index c8f7591..2b2930e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Stop inheriting liveRatio and liveRatioComputedAt from previous + memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) * Throw InvalidRequestException when queries contain relations on entire http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/src/java/org/apache/cassandra/db/DataTracker.java -- diff --git a/src/java/org/apache/cassandra/db/DataTracker.java b/src/java/org/apache/cassandra/db/DataTracker.java index 088255e..05ee13e 100644 --- a/src/java/org/apache/cassandra/db/DataTracker.java +++ b/src/java/org/apache/cassandra/db/DataTracker.java @@ -109,7 +109,7 @@ public class DataTracker public Memtable switchMemtable() { // atomically change the current memtable -Memtable newMemtable = new Memtable(cfstore, view.get().memtable); +Memtable newMemtable = new Memtable(cfstore); Memtable toFlushMemtable; View currentView, newView; do @@ -132,7 +132,7 @@ public class DataTracker { assert !cfstore.keyspace.metadata.durableWrites; -Memtable newMemtable = new Memtable(cfstore, view.get().memtable); +Memtable newMemtable = new Memtable(cfstore); View currentView, newView; do { @@ -323,7 +323,7 @@ public class DataTracker /** (Re)initializes the tracker, purging all references. */ void init() { -view.set(new View(new Memtable(cfstore, null), +view.set(new View(new Memtable(cfstore), Collections.MemtableemptySet(), Collections.SSTableReaderemptySet(), Collections.SSTableReaderemptySet(), http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/src/java/org/apache/cassandra/db/Memtable.java -- diff --git a/src/java/org/apache/cassandra/db/Memtable.java b/src/java/org/apache/cassandra/db/Memtable.java index 20adeb7..f9a6719 100644 --- a/src/java/org/apache/cassandra/db/Memtable.java +++ b/src/java/org/apache/cassandra/db/Memtable.java @@ -120,20 +120,12 @@ public class Memtable // memtable was created with the new or old comparator. public final AbstractType initialComparator; -public Memtable(ColumnFamilyStore cfs, Memtable previous) +public Memtable(ColumnFamilyStore cfs) { this.cfs = cfs; this.initialComparator = cfs.metadata.comparator; this.cfs.scheduleFlush(); -// Inherit liveRatio and liveRatioCompareAt from the previous memtable, if available, -// to minimise recalculation frequency as much as possible. -if (previous != null) -{ -liveRatio = previous.liveRatio; -liveRatioComputedAt.set(previous.liveRatioComputedAt.get() / 4); -} - CallableSetObject provider = new CallableSetObject() { public SetObject call() throws Exception @@ -175,12 +167,12 @@ public class Memtable public void maybeUpdateLiveRatio() { -// recompute liveRatio, if we have doubled the number of ops since last calculated +// recompute liveRatio, if we have increased the number of ops 10x since last calculated while (true) { long last = liveRatioComputedAt.get(); long operations = currentOperations.get(); -if (operations =
[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/DataTracker.java src/java/org/apache/cassandra/db/Memtable.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c8a8bfc1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c8a8bfc1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c8a8bfc1 Branch: refs/heads/cassandra-2.1.0 Commit: c8a8bfc1e7e89ea27143660c2d738f7fc2ea1a13 Parents: 39b8196 eeb0d4c Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 15:47:37 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 15:47:37 2014 +0300 -- --
[3/3] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fd40a618 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fd40a618 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fd40a618 Branch: refs/heads/cassandra-2.1 Commit: fd40a6183c3005968c96847e4122ea4690c45c1d Parents: bd692ba c8a8bfc Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 15:51:12 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 15:51:12 2014 +0300 -- --
[2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/DataTracker.java src/java/org/apache/cassandra/db/Memtable.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c8a8bfc1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c8a8bfc1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c8a8bfc1 Branch: refs/heads/cassandra-2.1 Commit: c8a8bfc1e7e89ea27143660c2d738f7fc2ea1a13 Parents: 39b8196 eeb0d4c Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 15:47:37 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 15:47:37 2014 +0300 -- --
[1/4] git commit: Stop inheriting liveRatio and liveRatioComputedAt from previous memtables
Repository: cassandra Updated Branches: refs/heads/trunk 37f517593 - 7036e39af Stop inheriting liveRatio and liveRatioComputedAt from previous memtables patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for CASSANDRA-7796 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/eeb0d4c9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/eeb0d4c9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/eeb0d4c9 Branch: refs/heads/trunk Commit: eeb0d4c90198b14113ee094587cf0eacceb2b96f Parents: 76adf0e Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 15:40:27 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 15:40:27 2014 +0300 -- CHANGES.txt | 2 ++ src/java/org/apache/cassandra/db/DataTracker.java | 6 +++--- src/java/org/apache/cassandra/db/Memtable.java| 14 +++--- 3 files changed, 8 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index c8f7591..2b2930e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Stop inheriting liveRatio and liveRatioComputedAt from previous + memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) * Throw InvalidRequestException when queries contain relations on entire http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/src/java/org/apache/cassandra/db/DataTracker.java -- diff --git a/src/java/org/apache/cassandra/db/DataTracker.java b/src/java/org/apache/cassandra/db/DataTracker.java index 088255e..05ee13e 100644 --- a/src/java/org/apache/cassandra/db/DataTracker.java +++ b/src/java/org/apache/cassandra/db/DataTracker.java @@ -109,7 +109,7 @@ public class DataTracker public Memtable switchMemtable() { // atomically change the current memtable -Memtable newMemtable = new Memtable(cfstore, view.get().memtable); +Memtable newMemtable = new Memtable(cfstore); Memtable toFlushMemtable; View currentView, newView; do @@ -132,7 +132,7 @@ public class DataTracker { assert !cfstore.keyspace.metadata.durableWrites; -Memtable newMemtable = new Memtable(cfstore, view.get().memtable); +Memtable newMemtable = new Memtable(cfstore); View currentView, newView; do { @@ -323,7 +323,7 @@ public class DataTracker /** (Re)initializes the tracker, purging all references. */ void init() { -view.set(new View(new Memtable(cfstore, null), +view.set(new View(new Memtable(cfstore), Collections.MemtableemptySet(), Collections.SSTableReaderemptySet(), Collections.SSTableReaderemptySet(), http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/src/java/org/apache/cassandra/db/Memtable.java -- diff --git a/src/java/org/apache/cassandra/db/Memtable.java b/src/java/org/apache/cassandra/db/Memtable.java index 20adeb7..f9a6719 100644 --- a/src/java/org/apache/cassandra/db/Memtable.java +++ b/src/java/org/apache/cassandra/db/Memtable.java @@ -120,20 +120,12 @@ public class Memtable // memtable was created with the new or old comparator. public final AbstractType initialComparator; -public Memtable(ColumnFamilyStore cfs, Memtable previous) +public Memtable(ColumnFamilyStore cfs) { this.cfs = cfs; this.initialComparator = cfs.metadata.comparator; this.cfs.scheduleFlush(); -// Inherit liveRatio and liveRatioCompareAt from the previous memtable, if available, -// to minimise recalculation frequency as much as possible. -if (previous != null) -{ -liveRatio = previous.liveRatio; -liveRatioComputedAt.set(previous.liveRatioComputedAt.get() / 4); -} - CallableSetObject provider = new CallableSetObject() { public SetObject call() throws Exception @@ -175,12 +167,12 @@ public class Memtable public void maybeUpdateLiveRatio() { -// recompute liveRatio, if we have doubled the number of ops since last calculated +// recompute liveRatio, if we have increased the number of ops 10x since last calculated while (true) { long last = liveRatioComputedAt.get(); long operations = currentOperations.get(); -if (operations = 2L * last) +
[3/4] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fd40a618 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fd40a618 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fd40a618 Branch: refs/heads/trunk Commit: fd40a6183c3005968c96847e4122ea4690c45c1d Parents: bd692ba c8a8bfc Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 15:51:12 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 15:51:12 2014 +0300 -- --
[1/3] git commit: Stop inheriting liveRatio and liveRatioComputedAt from previous memtables
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 bd692ba74 - fd40a6183 Stop inheriting liveRatio and liveRatioComputedAt from previous memtables patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for CASSANDRA-7796 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/eeb0d4c9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/eeb0d4c9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/eeb0d4c9 Branch: refs/heads/cassandra-2.1 Commit: eeb0d4c90198b14113ee094587cf0eacceb2b96f Parents: 76adf0e Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 15:40:27 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 15:40:27 2014 +0300 -- CHANGES.txt | 2 ++ src/java/org/apache/cassandra/db/DataTracker.java | 6 +++--- src/java/org/apache/cassandra/db/Memtable.java| 14 +++--- 3 files changed, 8 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index c8f7591..2b2930e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Stop inheriting liveRatio and liveRatioComputedAt from previous + memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) * Throw InvalidRequestException when queries contain relations on entire http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/src/java/org/apache/cassandra/db/DataTracker.java -- diff --git a/src/java/org/apache/cassandra/db/DataTracker.java b/src/java/org/apache/cassandra/db/DataTracker.java index 088255e..05ee13e 100644 --- a/src/java/org/apache/cassandra/db/DataTracker.java +++ b/src/java/org/apache/cassandra/db/DataTracker.java @@ -109,7 +109,7 @@ public class DataTracker public Memtable switchMemtable() { // atomically change the current memtable -Memtable newMemtable = new Memtable(cfstore, view.get().memtable); +Memtable newMemtable = new Memtable(cfstore); Memtable toFlushMemtable; View currentView, newView; do @@ -132,7 +132,7 @@ public class DataTracker { assert !cfstore.keyspace.metadata.durableWrites; -Memtable newMemtable = new Memtable(cfstore, view.get().memtable); +Memtable newMemtable = new Memtable(cfstore); View currentView, newView; do { @@ -323,7 +323,7 @@ public class DataTracker /** (Re)initializes the tracker, purging all references. */ void init() { -view.set(new View(new Memtable(cfstore, null), +view.set(new View(new Memtable(cfstore), Collections.MemtableemptySet(), Collections.SSTableReaderemptySet(), Collections.SSTableReaderemptySet(), http://git-wip-us.apache.org/repos/asf/cassandra/blob/eeb0d4c9/src/java/org/apache/cassandra/db/Memtable.java -- diff --git a/src/java/org/apache/cassandra/db/Memtable.java b/src/java/org/apache/cassandra/db/Memtable.java index 20adeb7..f9a6719 100644 --- a/src/java/org/apache/cassandra/db/Memtable.java +++ b/src/java/org/apache/cassandra/db/Memtable.java @@ -120,20 +120,12 @@ public class Memtable // memtable was created with the new or old comparator. public final AbstractType initialComparator; -public Memtable(ColumnFamilyStore cfs, Memtable previous) +public Memtable(ColumnFamilyStore cfs) { this.cfs = cfs; this.initialComparator = cfs.metadata.comparator; this.cfs.scheduleFlush(); -// Inherit liveRatio and liveRatioCompareAt from the previous memtable, if available, -// to minimise recalculation frequency as much as possible. -if (previous != null) -{ -liveRatio = previous.liveRatio; -liveRatioComputedAt.set(previous.liveRatioComputedAt.get() / 4); -} - CallableSetObject provider = new CallableSetObject() { public SetObject call() throws Exception @@ -175,12 +167,12 @@ public class Memtable public void maybeUpdateLiveRatio() { -// recompute liveRatio, if we have doubled the number of ops since last calculated +// recompute liveRatio, if we have increased the number of ops 10x since last calculated while (true) { long last = liveRatioComputedAt.get(); long operations = currentOperations.get(); -if (operations = 2L *
[4/4] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7036e39a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7036e39a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7036e39a Branch: refs/heads/trunk Commit: 7036e39af74db8028afcb9c10e009d979fa4ad65 Parents: 37f5175 fd40a61 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 15:51:58 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 15:51:58 2014 +0300 -- --
[2/4] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/db/DataTracker.java src/java/org/apache/cassandra/db/Memtable.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c8a8bfc1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c8a8bfc1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c8a8bfc1 Branch: refs/heads/trunk Commit: c8a8bfc1e7e89ea27143660c2d738f7fc2ea1a13 Parents: 39b8196 eeb0d4c Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 15:47:37 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 15:47:37 2014 +0300 -- --
[jira] [Updated] (CASSANDRA-7606) Add IF [NOT] EXISTS to CREATE/DROP trigger
[ https://issues.apache.org/jira/browse/CASSANDRA-7606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Stupp updated CASSANDRA-7606: Reviewer: Robert Stupp Add IF [NOT] EXISTS to CREATE/DROP trigger -- Key: CASSANDRA-7606 URL: https://issues.apache.org/jira/browse/CASSANDRA-7606 Project: Cassandra Issue Type: Improvement Reporter: Robert Stupp Assignee: Benjamin Lerer Priority: Minor Labels: cql, docs Fix For: 2.1.1 Attachments: CASSANDRA-7606.txt All CREATE/DROP statements support IF [NOT] EXISTS - except CREATE/DROP trigger. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-7282) Faster Memtable map
[ https://issues.apache.org/jira/browse/CASSANDRA-7282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103866#comment-14103866 ] Joshua McKenzie commented on CASSANDRA-7282: Some interesting results on the [99.9th|http://riptano.github.io/cassandra_performance/graph_v3/graph.html?stats=stats.7282.defaults.jsonmetric=99.9th_latencyoperation=1_writesmoothing=1show_aggregates=truexmin=0xmax=688.16ymin=0ymax=1600] and [max|http://riptano.github.io/cassandra_performance/graph_v3/graph.html?stats=stats.7282.defaults.jsonmetric=max_latencyoperation=1_writesmoothing=1show_aggregates=truexmin=0xmax=688.16ymin=0ymax=3000] on write latency. While their aggregated values look better on the new non-blocking hashordered map there look to be more outliers. Any ideas on why that might be [~benedict]? 95th and 99th shows pretty [marked improvement|http://riptano.github.io/cassandra_performance/graph_v3/graph.html?stats=stats.7282.defaults.jsonmetric=99th_latencyoperation=1_writesmoothing=1show_aggregates=truexmin=0xmax=688.16ymin=0ymax=140] so the differential looks to be on the extremes only. Either way - I'll be very interested to see the results of the test w/memtable and row size changes. Faster Memtable map --- Key: CASSANDRA-7282 URL: https://issues.apache.org/jira/browse/CASSANDRA-7282 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Benedict Assignee: Benedict Labels: performance Fix For: 3.0 Currently we maintain a ConcurrentSkipLastMap of DecoratedKey - Partition in our memtables. Maintaining this is an O(lg(n)) operation; since the vast majority of users use a hash partitioner, it occurs to me we could maintain a hybrid ordered list / hash map. The list would impose the normal order on the collection, but a hash index would live alongside as part of the same data structure, simply mapping into the list and permitting O(1) lookups and inserts. I've chosen to implement this initial version as a linked-list node per item, but we can optimise this in future by storing fatter nodes that permit a cache-line's worth of hashes to be checked at once, further reducing the constant factor costs for lookups. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7802) Need to export JVM_OPTS from init.d script
[ https://issues.apache.org/jira/browse/CASSANDRA-7802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-7802: -- Priority: Minor (was: Critical) Need to export JVM_OPTS from init.d script -- Key: CASSANDRA-7802 URL: https://issues.apache.org/jira/browse/CASSANDRA-7802 Project: Cassandra Issue Type: Bug Components: Packaging Environment: Debian/Ubuntu Reporter: Matt Robenolt Priority: Minor Labels: patch Fix For: 2.0.9, 2.0.10, 2.1 rc6 Attachments: 42.diff Since 2.0, the init.d script was refactored and requires JVM variables to be exported for them to actually be picked up and used. In this case, JVM_OPTS never gets exported, so user defined variables from /etc/default/cassandra are never applied. This also affects the latest 2.1 rc, and I assume all previous versions. Pull request: https://github.com/apache/cassandra/pull/42 Diff: https://github.com/apache/cassandra/pull/42.diff Patch: https://github.com/apache/cassandra/pull/42.patch -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7803) When compaction is interrupted, it leaves locked, undeletable files
[ https://issues.apache.org/jira/browse/CASSANDRA-7803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-7803: -- Assignee: Marcus Eriksson When compaction is interrupted, it leaves locked, undeletable files --- Key: CASSANDRA-7803 URL: https://issues.apache.org/jira/browse/CASSANDRA-7803 Project: Cassandra Issue Type: Bug Components: Core Environment: RedHat, xfs4, JNA enabled, JBOD, Reporter: Scooletz Assignee: Marcus Eriksson Labels: Comparator Fix For: 2.1.1 During tests of new features of 2.1 like: - incremental repairs - leveled compaction I interrupted a compaction, which left the following ERROR in the _system.log_ {quote} org.apache.cassandra.db.compaction.CompactionInterruptedException: Compaction interrupted: Compaction@152e6e70-1975-11e4-ba09-61f0d75c60c6(xx, xxx, 378505918/1993581634)bytes at org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:174) at org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:74) at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:235) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_09] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_09] at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_09] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09] {quote} Right after that, a cascade of reoccurring errors was being emitted till the restart: {quote} ERROR [NonPeriodicTasks:1] 2014-08-19 13:38:41,258 SSTableDeletingTask.java:81 - Unable to delete /grid/data04/cassandra/data/xx/xxx-152e6e70197511e4ba0961f0d75c60c6/xx-xxx-ka-55058-Data.db (it will be removed on server restart; we'll also retry after GC) {quote} which made this node blinking (noted from the other nodes gossiper log entries). After restart, the node is healthy and fully operational. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-7803) When compaction is interrupted, it leaves locked, undeletable files
[ https://issues.apache.org/jira/browse/CASSANDRA-7803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14103950#comment-14103950 ] Jonathan Ellis commented on CASSANDRA-7803: --- Not sure if this is related to the incremental paging-in of compaction results, or if it might affect 2.0 as well. When compaction is interrupted, it leaves locked, undeletable files --- Key: CASSANDRA-7803 URL: https://issues.apache.org/jira/browse/CASSANDRA-7803 Project: Cassandra Issue Type: Bug Components: Core Environment: RedHat, xfs4, JNA enabled, JBOD, Reporter: Scooletz Assignee: Marcus Eriksson Labels: Comparator Fix For: 2.1.1 During tests of new features of 2.1 like: - incremental repairs - leveled compaction I interrupted a compaction, which left the following ERROR in the _system.log_ {quote} org.apache.cassandra.db.compaction.CompactionInterruptedException: Compaction interrupted: Compaction@152e6e70-1975-11e4-ba09-61f0d75c60c6(xx, xxx, 378505918/1993581634)bytes at org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:174) at org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:74) at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:235) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_09] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_09] at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_09] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09] {quote} Right after that, a cascade of reoccurring errors was being emitted till the restart: {quote} ERROR [NonPeriodicTasks:1] 2014-08-19 13:38:41,258 SSTableDeletingTask.java:81 - Unable to delete /grid/data04/cassandra/data/xx/xxx-152e6e70197511e4ba0961f0d75c60c6/xx-xxx-ka-55058-Data.db (it will be removed on server restart; we'll also retry after GC) {quote} which made this node blinking (noted from the other nodes gossiper log entries). After restart, the node is healthy and fully operational. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7803) When compaction is interrupted, it leaves locked, undeletable files
[ https://issues.apache.org/jira/browse/CASSANDRA-7803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-7803: -- Fix Version/s: 2.1.1 When compaction is interrupted, it leaves locked, undeletable files --- Key: CASSANDRA-7803 URL: https://issues.apache.org/jira/browse/CASSANDRA-7803 Project: Cassandra Issue Type: Bug Components: Core Environment: RedHat, xfs4, JNA enabled, JBOD, Reporter: Scooletz Assignee: Marcus Eriksson Labels: Comparator Fix For: 2.1.1 During tests of new features of 2.1 like: - incremental repairs - leveled compaction I interrupted a compaction, which left the following ERROR in the _system.log_ {quote} org.apache.cassandra.db.compaction.CompactionInterruptedException: Compaction interrupted: Compaction@152e6e70-1975-11e4-ba09-61f0d75c60c6(xx, xxx, 378505918/1993581634)bytes at org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:174) at org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:74) at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:235) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_09] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) ~[na:1.7.0_09] at java.util.concurrent.FutureTask.run(FutureTask.java:166) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) ~[na:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_09] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09] {quote} Right after that, a cascade of reoccurring errors was being emitted till the restart: {quote} ERROR [NonPeriodicTasks:1] 2014-08-19 13:38:41,258 SSTableDeletingTask.java:81 - Unable to delete /grid/data04/cassandra/data/xx/xxx-152e6e70197511e4ba0961f0d75c60c6/xx-xxx-ka-55058-Data.db (it will be removed on server restart; we'll also retry after GC) {quote} which made this node blinking (noted from the other nodes gossiper log entries). After restart, the node is healthy and fully operational. -- This message was sent by Atlassian JIRA (v6.2#6252)
[02/10] git commit: Make StreamReceiveTask thread safe and gc friendly
Make StreamReceiveTask thread safe and gc friendly patch by yukim; reviewed by benedict for CASSANDRA-7795 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4fc417c4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4fc417c4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4fc417c4 Branch: refs/heads/cassandra-2.1.0 Commit: 4fc417c404aab0713a7d9747d22ce7eceb777859 Parents: eeb0d4c Author: Yuki Morishita yu...@apache.org Authored: Tue Aug 19 13:31:30 2014 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Wed Aug 20 09:49:39 2014 -0500 -- CHANGES.txt | 1 + .../cassandra/streaming/StreamReceiveTask.java | 56 2 files changed, 35 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4fc417c4/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2b2930e..fe9f4e0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -60,6 +60,7 @@ * Track max/min timestamps for range tombstones (CASSANDRA-7647) * Fix NPE when listing saved caches dir (CASSANDRA-7632) * Fix sstableloader unable to connect encrypted node (CASSANDRA-7585) + * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) Merged from 1.2: * Validate empty cell names from counter updates (CASSANDRA-7798) * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4fc417c4/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java -- diff --git a/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java b/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java index 9a2568d..223a46e 100644 --- a/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java +++ b/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java @@ -21,13 +21,16 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.UUID; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor; import org.apache.cassandra.config.Schema; import org.apache.cassandra.db.ColumnFamilyStore; import org.apache.cassandra.db.Keyspace; import org.apache.cassandra.io.sstable.SSTableReader; import org.apache.cassandra.io.sstable.SSTableWriter; -import org.apache.cassandra.service.StorageService; +import org.apache.cassandra.utils.FBUtilities; import org.apache.cassandra.utils.Pair; /** @@ -35,11 +38,17 @@ import org.apache.cassandra.utils.Pair; */ public class StreamReceiveTask extends StreamTask { +private static final ThreadPoolExecutor executor = DebuggableThreadPoolExecutor.createWithMaximumPoolSize(StreamReceiveTask, + FBUtilities.getAvailableProcessors(), + 60, TimeUnit.SECONDS); + // number of files to receive private final int totalFiles; // total size of files to receive private final long totalSize; -private volatile boolean aborted; + +// true if task is done (either completed or aborted) +private boolean done = false; // holds references to SSTables received protected CollectionSSTableWriter sstables; @@ -57,14 +66,19 @@ public class StreamReceiveTask extends StreamTask * * @param sstable SSTable file received. */ -public void received(SSTableWriter sstable) +public synchronized void received(SSTableWriter sstable) { +if (done) +return; + assert cfId.equals(sstable.metadata.cfId); -assert !aborted; sstables.add(sstable); if (sstables.size() == totalFiles) -complete(); +{ +done = true; +executor.submit(new OnCompletionRunnable(this)); +} } public int getTotalNumberOfFiles() @@ -77,12 +91,6 @@ public class StreamReceiveTask extends StreamTask return totalSize; } -private void complete() -{ -if (!sstables.isEmpty()) -StorageService.tasks.submit(new OnCompletionRunnable(this)); -} - private static class OnCompletionRunnable implements Runnable { private final StreamReceiveTask task; @@ -103,6 +111,7 @@ public class StreamReceiveTask extends StreamTask for (SSTableWriter writer : task.sstables) readers.add(writer.closeAndOpenReader());
[09/10] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cc79fe1a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cc79fe1a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cc79fe1a Branch: refs/heads/cassandra-2.1 Commit: cc79fe1a1c2e396d9362f23e68ace917b9c03f5c Parents: fd40a61 45159ae Author: Yuki Morishita yu...@apache.org Authored: Wed Aug 20 10:04:22 2014 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Wed Aug 20 10:04:22 2014 -0500 -- CHANGES.txt | 1 + .../cassandra/streaming/StreamReceiveTask.java | 57 2 files changed, 35 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc79fe1a/CHANGES.txt --
[06/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/streaming/StreamReceiveTask.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/45159ae7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/45159ae7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/45159ae7 Branch: refs/heads/cassandra-2.1.0 Commit: 45159ae7b3a1b1c67050ff03fd72a71c61f04a91 Parents: c8a8bfc 4fc417c Author: Yuki Morishita yu...@apache.org Authored: Wed Aug 20 10:03:59 2014 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Wed Aug 20 10:03:59 2014 -0500 -- CHANGES.txt | 1 + .../cassandra/streaming/StreamReceiveTask.java | 57 2 files changed, 35 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/45159ae7/CHANGES.txt -- diff --cc CHANGES.txt index 873eb78,fe9f4e0..ebd74b2 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,39 -1,22 +1,40 @@@ -2.0.10 - * Stop inheriting liveRatio and liveRatioComputedAt from previous - memtables (CASSANDRA-7796) +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) +Merged from 2.0: * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) ++ * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) +Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226)
[04/10] git commit: Make StreamReceiveTask thread safe and gc friendly
Make StreamReceiveTask thread safe and gc friendly patch by yukim; reviewed by benedict for CASSANDRA-7795 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4fc417c4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4fc417c4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4fc417c4 Branch: refs/heads/trunk Commit: 4fc417c404aab0713a7d9747d22ce7eceb777859 Parents: eeb0d4c Author: Yuki Morishita yu...@apache.org Authored: Tue Aug 19 13:31:30 2014 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Wed Aug 20 09:49:39 2014 -0500 -- CHANGES.txt | 1 + .../cassandra/streaming/StreamReceiveTask.java | 56 2 files changed, 35 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4fc417c4/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2b2930e..fe9f4e0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -60,6 +60,7 @@ * Track max/min timestamps for range tombstones (CASSANDRA-7647) * Fix NPE when listing saved caches dir (CASSANDRA-7632) * Fix sstableloader unable to connect encrypted node (CASSANDRA-7585) + * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) Merged from 1.2: * Validate empty cell names from counter updates (CASSANDRA-7798) * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4fc417c4/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java -- diff --git a/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java b/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java index 9a2568d..223a46e 100644 --- a/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java +++ b/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java @@ -21,13 +21,16 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.UUID; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor; import org.apache.cassandra.config.Schema; import org.apache.cassandra.db.ColumnFamilyStore; import org.apache.cassandra.db.Keyspace; import org.apache.cassandra.io.sstable.SSTableReader; import org.apache.cassandra.io.sstable.SSTableWriter; -import org.apache.cassandra.service.StorageService; +import org.apache.cassandra.utils.FBUtilities; import org.apache.cassandra.utils.Pair; /** @@ -35,11 +38,17 @@ import org.apache.cassandra.utils.Pair; */ public class StreamReceiveTask extends StreamTask { +private static final ThreadPoolExecutor executor = DebuggableThreadPoolExecutor.createWithMaximumPoolSize(StreamReceiveTask, + FBUtilities.getAvailableProcessors(), + 60, TimeUnit.SECONDS); + // number of files to receive private final int totalFiles; // total size of files to receive private final long totalSize; -private volatile boolean aborted; + +// true if task is done (either completed or aborted) +private boolean done = false; // holds references to SSTables received protected CollectionSSTableWriter sstables; @@ -57,14 +66,19 @@ public class StreamReceiveTask extends StreamTask * * @param sstable SSTable file received. */ -public void received(SSTableWriter sstable) +public synchronized void received(SSTableWriter sstable) { +if (done) +return; + assert cfId.equals(sstable.metadata.cfId); -assert !aborted; sstables.add(sstable); if (sstables.size() == totalFiles) -complete(); +{ +done = true; +executor.submit(new OnCompletionRunnable(this)); +} } public int getTotalNumberOfFiles() @@ -77,12 +91,6 @@ public class StreamReceiveTask extends StreamTask return totalSize; } -private void complete() -{ -if (!sstables.isEmpty()) -StorageService.tasks.submit(new OnCompletionRunnable(this)); -} - private static class OnCompletionRunnable implements Runnable { private final StreamReceiveTask task; @@ -103,6 +111,7 @@ public class StreamReceiveTask extends StreamTask for (SSTableWriter writer : task.sstables) readers.add(writer.closeAndOpenReader());
[07/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/streaming/StreamReceiveTask.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/45159ae7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/45159ae7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/45159ae7 Branch: refs/heads/trunk Commit: 45159ae7b3a1b1c67050ff03fd72a71c61f04a91 Parents: c8a8bfc 4fc417c Author: Yuki Morishita yu...@apache.org Authored: Wed Aug 20 10:03:59 2014 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Wed Aug 20 10:03:59 2014 -0500 -- CHANGES.txt | 1 + .../cassandra/streaming/StreamReceiveTask.java | 57 2 files changed, 35 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/45159ae7/CHANGES.txt -- diff --cc CHANGES.txt index 873eb78,fe9f4e0..ebd74b2 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,39 -1,22 +1,40 @@@ -2.0.10 - * Stop inheriting liveRatio and liveRatioComputedAt from previous - memtables (CASSANDRA-7796) +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) +Merged from 2.0: * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) ++ * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) +Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226)
[03/10] git commit: Make StreamReceiveTask thread safe and gc friendly
Make StreamReceiveTask thread safe and gc friendly patch by yukim; reviewed by benedict for CASSANDRA-7795 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4fc417c4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4fc417c4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4fc417c4 Branch: refs/heads/cassandra-2.1 Commit: 4fc417c404aab0713a7d9747d22ce7eceb777859 Parents: eeb0d4c Author: Yuki Morishita yu...@apache.org Authored: Tue Aug 19 13:31:30 2014 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Wed Aug 20 09:49:39 2014 -0500 -- CHANGES.txt | 1 + .../cassandra/streaming/StreamReceiveTask.java | 56 2 files changed, 35 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4fc417c4/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2b2930e..fe9f4e0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -60,6 +60,7 @@ * Track max/min timestamps for range tombstones (CASSANDRA-7647) * Fix NPE when listing saved caches dir (CASSANDRA-7632) * Fix sstableloader unable to connect encrypted node (CASSANDRA-7585) + * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) Merged from 1.2: * Validate empty cell names from counter updates (CASSANDRA-7798) * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4fc417c4/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java -- diff --git a/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java b/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java index 9a2568d..223a46e 100644 --- a/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java +++ b/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java @@ -21,13 +21,16 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.UUID; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor; import org.apache.cassandra.config.Schema; import org.apache.cassandra.db.ColumnFamilyStore; import org.apache.cassandra.db.Keyspace; import org.apache.cassandra.io.sstable.SSTableReader; import org.apache.cassandra.io.sstable.SSTableWriter; -import org.apache.cassandra.service.StorageService; +import org.apache.cassandra.utils.FBUtilities; import org.apache.cassandra.utils.Pair; /** @@ -35,11 +38,17 @@ import org.apache.cassandra.utils.Pair; */ public class StreamReceiveTask extends StreamTask { +private static final ThreadPoolExecutor executor = DebuggableThreadPoolExecutor.createWithMaximumPoolSize(StreamReceiveTask, + FBUtilities.getAvailableProcessors(), + 60, TimeUnit.SECONDS); + // number of files to receive private final int totalFiles; // total size of files to receive private final long totalSize; -private volatile boolean aborted; + +// true if task is done (either completed or aborted) +private boolean done = false; // holds references to SSTables received protected CollectionSSTableWriter sstables; @@ -57,14 +66,19 @@ public class StreamReceiveTask extends StreamTask * * @param sstable SSTable file received. */ -public void received(SSTableWriter sstable) +public synchronized void received(SSTableWriter sstable) { +if (done) +return; + assert cfId.equals(sstable.metadata.cfId); -assert !aborted; sstables.add(sstable); if (sstables.size() == totalFiles) -complete(); +{ +done = true; +executor.submit(new OnCompletionRunnable(this)); +} } public int getTotalNumberOfFiles() @@ -77,12 +91,6 @@ public class StreamReceiveTask extends StreamTask return totalSize; } -private void complete() -{ -if (!sstables.isEmpty()) -StorageService.tasks.submit(new OnCompletionRunnable(this)); -} - private static class OnCompletionRunnable implements Runnable { private final StreamReceiveTask task; @@ -103,6 +111,7 @@ public class StreamReceiveTask extends StreamTask for (SSTableWriter writer : task.sstables) readers.add(writer.closeAndOpenReader());
[05/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt src/java/org/apache/cassandra/streaming/StreamReceiveTask.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/45159ae7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/45159ae7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/45159ae7 Branch: refs/heads/cassandra-2.1 Commit: 45159ae7b3a1b1c67050ff03fd72a71c61f04a91 Parents: c8a8bfc 4fc417c Author: Yuki Morishita yu...@apache.org Authored: Wed Aug 20 10:03:59 2014 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Wed Aug 20 10:03:59 2014 -0500 -- CHANGES.txt | 1 + .../cassandra/streaming/StreamReceiveTask.java | 57 2 files changed, 35 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/45159ae7/CHANGES.txt -- diff --cc CHANGES.txt index 873eb78,fe9f4e0..ebd74b2 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,39 -1,22 +1,40 @@@ -2.0.10 - * Stop inheriting liveRatio and liveRatioComputedAt from previous - memtables (CASSANDRA-7796) +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) +Merged from 2.0: * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) ++ * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) +Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226)
[10/10] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Conflicts: src/java/org/apache/cassandra/streaming/StreamReceiveTask.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c158efdf Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c158efdf Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c158efdf Branch: refs/heads/trunk Commit: c158efdf6e3c0cb35321be01c3774e5e2b609f6c Parents: 7036e39 cc79fe1 Author: Yuki Morishita yu...@apache.org Authored: Wed Aug 20 10:10:01 2014 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Wed Aug 20 10:10:01 2014 -0500 -- CHANGES.txt | 1 + .../cassandra/streaming/StreamReceiveTask.java | 56 2 files changed, 35 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c158efdf/CHANGES.txt --
[01/10] git commit: Make StreamReceiveTask thread safe and gc friendly
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 eeb0d4c90 - 4fc417c40 refs/heads/cassandra-2.1 fd40a6183 - cc79fe1a1 refs/heads/cassandra-2.1.0 c8a8bfc1e - 45159ae7b refs/heads/trunk 7036e39af - c158efdf6 Make StreamReceiveTask thread safe and gc friendly patch by yukim; reviewed by benedict for CASSANDRA-7795 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4fc417c4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4fc417c4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4fc417c4 Branch: refs/heads/cassandra-2.0 Commit: 4fc417c404aab0713a7d9747d22ce7eceb777859 Parents: eeb0d4c Author: Yuki Morishita yu...@apache.org Authored: Tue Aug 19 13:31:30 2014 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Wed Aug 20 09:49:39 2014 -0500 -- CHANGES.txt | 1 + .../cassandra/streaming/StreamReceiveTask.java | 56 2 files changed, 35 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4fc417c4/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2b2930e..fe9f4e0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -60,6 +60,7 @@ * Track max/min timestamps for range tombstones (CASSANDRA-7647) * Fix NPE when listing saved caches dir (CASSANDRA-7632) * Fix sstableloader unable to connect encrypted node (CASSANDRA-7585) + * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) Merged from 1.2: * Validate empty cell names from counter updates (CASSANDRA-7798) * Improve PasswordAuthenticator default super user setup (CASSANDRA-7788) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4fc417c4/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java -- diff --git a/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java b/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java index 9a2568d..223a46e 100644 --- a/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java +++ b/src/java/org/apache/cassandra/streaming/StreamReceiveTask.java @@ -21,13 +21,16 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.UUID; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor; import org.apache.cassandra.config.Schema; import org.apache.cassandra.db.ColumnFamilyStore; import org.apache.cassandra.db.Keyspace; import org.apache.cassandra.io.sstable.SSTableReader; import org.apache.cassandra.io.sstable.SSTableWriter; -import org.apache.cassandra.service.StorageService; +import org.apache.cassandra.utils.FBUtilities; import org.apache.cassandra.utils.Pair; /** @@ -35,11 +38,17 @@ import org.apache.cassandra.utils.Pair; */ public class StreamReceiveTask extends StreamTask { +private static final ThreadPoolExecutor executor = DebuggableThreadPoolExecutor.createWithMaximumPoolSize(StreamReceiveTask, + FBUtilities.getAvailableProcessors(), + 60, TimeUnit.SECONDS); + // number of files to receive private final int totalFiles; // total size of files to receive private final long totalSize; -private volatile boolean aborted; + +// true if task is done (either completed or aborted) +private boolean done = false; // holds references to SSTables received protected CollectionSSTableWriter sstables; @@ -57,14 +66,19 @@ public class StreamReceiveTask extends StreamTask * * @param sstable SSTable file received. */ -public void received(SSTableWriter sstable) +public synchronized void received(SSTableWriter sstable) { +if (done) +return; + assert cfId.equals(sstable.metadata.cfId); -assert !aborted; sstables.add(sstable); if (sstables.size() == totalFiles) -complete(); +{ +done = true; +executor.submit(new OnCompletionRunnable(this)); +} } public int getTotalNumberOfFiles() @@ -77,12 +91,6 @@ public class StreamReceiveTask extends StreamTask return totalSize; } -private void complete() -{ -if (!sstables.isEmpty()) -StorageService.tasks.submit(new OnCompletionRunnable(this)); -} - private static class OnCompletionRunnable implements Runnable { private
[08/10] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cc79fe1a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cc79fe1a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cc79fe1a Branch: refs/heads/trunk Commit: cc79fe1a1c2e396d9362f23e68ace917b9c03f5c Parents: fd40a61 45159ae Author: Yuki Morishita yu...@apache.org Authored: Wed Aug 20 10:04:22 2014 -0500 Committer: Yuki Morishita yu...@apache.org Committed: Wed Aug 20 10:04:22 2014 -0500 -- CHANGES.txt | 1 + .../cassandra/streaming/StreamReceiveTask.java | 57 2 files changed, 35 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cc79fe1a/CHANGES.txt --
[jira] [Commented] (CASSANDRA-7774) CqlRecordReader creates wrong cluster if the first replica of a split is down
[ https://issues.apache.org/jira/browse/CASSANDRA-7774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14104008#comment-14104008 ] Jeremiah Jordan commented on CASSANDRA-7774: So the LimitedLocalNodeFirstLocalBalancingPolicy doesn't work right? If thats true we should fix that I think, not make a new policy? As spark and other things are using LimitedLocalNodeFirstLocalBalancingPolicy. CqlRecordReader creates wrong cluster if the first replica of a split is down - Key: CASSANDRA-7774 URL: https://issues.apache.org/jira/browse/CASSANDRA-7774 Project: Cassandra Issue Type: Bug Components: Hadoop Reporter: Jacek Lewandowski Assignee: Jacek Lewandowski Attachments: 0001-CASSANDRA-7774-Fixed-cluster-initialisation-for-a-sp.patch, CASSANDRA-7774-patch-v2.patch For a given split, {{CqlRecordReader}} gets a list of replicas of that split. Then, it tries to create a Cluster object with a ClusterBuilder for each replica separately in a loop, so that if the cluster creation fails for a certain replica, the next replica is tried. Unfortunately it does not work, because the cluster creation does not fail if the provided contact point is down. So, it always selects the first replica regardless of its state. The solution is quite simple - {{ClusterBuilder}} accepts a collection of contact points - at least one of them must be up. So instead of iterating over the replicas we can pass the whole set of them and the driver will select the working one. It will follow some changes in the load balancing policy - I'm going to switch to use -the same- similar balancing policy -as- to the one we use in OSS Spark Connector. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Issue Comment Deleted] (CASSANDRA-7774) CqlRecordReader creates wrong cluster if the first replica of a split is down
[ https://issues.apache.org/jira/browse/CASSANDRA-7774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremiah Jordan updated CASSANDRA-7774: --- Comment: was deleted (was: So the LimitedLocalNodeFirstLocalBalancingPolicy doesn't work right? If thats true we should fix that I think, not make a new policy? As spark and other things are using LimitedLocalNodeFirstLocalBalancingPolicy.) CqlRecordReader creates wrong cluster if the first replica of a split is down - Key: CASSANDRA-7774 URL: https://issues.apache.org/jira/browse/CASSANDRA-7774 Project: Cassandra Issue Type: Bug Components: Hadoop Reporter: Jacek Lewandowski Assignee: Jacek Lewandowski Attachments: 0001-CASSANDRA-7774-Fixed-cluster-initialisation-for-a-sp.patch, CASSANDRA-7774-patch-v2.patch For a given split, {{CqlRecordReader}} gets a list of replicas of that split. Then, it tries to create a Cluster object with a ClusterBuilder for each replica separately in a loop, so that if the cluster creation fails for a certain replica, the next replica is tried. Unfortunately it does not work, because the cluster creation does not fail if the provided contact point is down. So, it always selects the first replica regardless of its state. The solution is quite simple - {{ClusterBuilder}} accepts a collection of contact points - at least one of them must be up. So instead of iterating over the replicas we can pass the whole set of them and the driver will select the working one. It will follow some changes in the load balancing policy - I'm going to switch to use -the same- similar balancing policy -as- to the one we use in OSS Spark Connector. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-7282) Faster Memtable map
[ https://issues.apache.org/jira/browse/CASSANDRA-7282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14104014#comment-14104014 ] Benedict commented on CASSANDRA-7282: - A few possibilities: 1) very few data points, so difficult to draw much conclusion 2) the 99.9th%ile border is arbitrary with so few data points, as evidenced by the better max latency 3) the largest latencies are ordinarily encountered either during CL or memtable flush; since we're writing faster, it's possible we are simply putting the disks under increased pressure and hitting higher latencies more often, bringing the 99.9th%ile closer to max Ryan - I'd suggest running with offheap_objects, raising the commit log size limit to 16Gb, a memtable_cleanup_threshold of 0.99, setting your on heap memtable capacity to 4Gb, your offheap to 2Gb, and running the test with just one column of around 32 bytes. Then use 48M items and perform your normal run of insert then read; we *shouldn't* see any flush result from that if I did my quick bit of math correctly. Faster Memtable map --- Key: CASSANDRA-7282 URL: https://issues.apache.org/jira/browse/CASSANDRA-7282 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Benedict Assignee: Benedict Labels: performance Fix For: 3.0 Currently we maintain a ConcurrentSkipLastMap of DecoratedKey - Partition in our memtables. Maintaining this is an O(lg(n)) operation; since the vast majority of users use a hash partitioner, it occurs to me we could maintain a hybrid ordered list / hash map. The list would impose the normal order on the collection, but a hash index would live alongside as part of the same data structure, simply mapping into the list and permitting O(1) lookups and inserts. I've chosen to implement this initial version as a linked-list node per item, but we can optimise this in future by storing fatter nodes that permit a cache-line's worth of hashes to be checked at once, further reducing the constant factor costs for lookups. -- This message was sent by Atlassian JIRA (v6.2#6252)
git commit: Fix ReversedType.isCompatibleWith()
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 4fc417c40 - a4e108c40 Fix ReversedType.isCompatibleWith() Patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-7797 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a4e108c4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a4e108c4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a4e108c4 Branch: refs/heads/cassandra-2.0 Commit: a4e108c40b234fa754a56a21b63635b83f90aceb Parents: 4fc417c Author: Tyler Hobbs ty...@datastax.com Authored: Wed Aug 20 10:58:54 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Aug 20 11:01:28 2014 -0500 -- CHANGES.txt | 2 ++ .../cassandra/db/marshal/ReversedType.java | 9 ++ .../org/apache/cassandra/cql3/TypeTest.java | 34 3 files changed, 45 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index fe9f4e0..94bdd89 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Fix ALTER clustering column type from DateType to TimestampType when + using DESC clustering order (CASSANRDA-7797) * Stop inheriting liveRatio and liveRatioComputedAt from previous memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/src/java/org/apache/cassandra/db/marshal/ReversedType.java -- diff --git a/src/java/org/apache/cassandra/db/marshal/ReversedType.java b/src/java/org/apache/cassandra/db/marshal/ReversedType.java index cd61bbe..ffb0229 100644 --- a/src/java/org/apache/cassandra/db/marshal/ReversedType.java +++ b/src/java/org/apache/cassandra/db/marshal/ReversedType.java @@ -84,6 +84,15 @@ public class ReversedTypeT extends AbstractTypeT } @Override +public boolean isCompatibleWith(AbstractType? otherType) +{ +if (!(otherType instanceof ReversedType)) +return false; + +return this.baseType.isCompatibleWith(((ReversedType) otherType).baseType); +} + +@Override public boolean isValueCompatibleWith(AbstractType? otherType) { return this.baseType.isValueCompatibleWith(otherType); http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/test/unit/org/apache/cassandra/cql3/TypeTest.java -- diff --git a/test/unit/org/apache/cassandra/cql3/TypeTest.java b/test/unit/org/apache/cassandra/cql3/TypeTest.java index f911a44..b08ca2c 100644 --- a/test/unit/org/apache/cassandra/cql3/TypeTest.java +++ b/test/unit/org/apache/cassandra/cql3/TypeTest.java @@ -19,6 +19,7 @@ package org.apache.cassandra.cql3; import org.apache.cassandra.SchemaLoader; import org.apache.cassandra.db.ConsistencyLevel; +import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.exceptions.RequestExecutionException; import org.apache.cassandra.exceptions.RequestValidationException; import org.apache.cassandra.gms.Gossiper; @@ -35,6 +36,7 @@ import org.slf4j.LoggerFactory; import static org.apache.cassandra.cql3.QueryProcessor.process; import static org.apache.cassandra.cql3.QueryProcessor.processInternal; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; public class TypeTest { @@ -141,4 +143,36 @@ public class TypeTest results = executePrepared(prepare(select), QueryOptions.DEFAULT); assertEquals(2, results.size()); } + +@Test +// tests CASSANDRA-7797 +public void testAlterReversedColumn() throws Throwable +{ +executeSchemaChange(CREATE TABLE IF NOT EXISTS %s.test_alter_reversed (a int, b 'org.apache.cassandra.db.marshal.DateType', PRIMARY KEY (a, b)) WITH CLUSTERING ORDER BY (b DESC)); +executeSchemaChange(ALTER TABLE %s.test_alter_reversed ALTER b TYPE 'org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimestampType)'); +} + +@Test +public void testIncompatibleReversedTypes() throws Throwable +{ +executeSchemaChange(CREATE TABLE IF NOT EXISTS %s.test_incompatible_reversed (a int, b 'org.apache.cassandra.db.marshal.DateType', PRIMARY KEY (a, b)) WITH CLUSTERING ORDER BY (b DESC)); +try +{ +executeSchemaChange(ALTER TABLE %s.test_incompatible_reversed ALTER b TYPE 'org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType)'); +fail(Expected error for ALTER statement); +} +
[1/2] git commit: Fix ReversedType.isCompatibleWith()
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1.0 45159ae7b - d3450570c Fix ReversedType.isCompatibleWith() Patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-7797 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a4e108c4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a4e108c4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a4e108c4 Branch: refs/heads/cassandra-2.1.0 Commit: a4e108c40b234fa754a56a21b63635b83f90aceb Parents: 4fc417c Author: Tyler Hobbs ty...@datastax.com Authored: Wed Aug 20 10:58:54 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Aug 20 11:01:28 2014 -0500 -- CHANGES.txt | 2 ++ .../cassandra/db/marshal/ReversedType.java | 9 ++ .../org/apache/cassandra/cql3/TypeTest.java | 34 3 files changed, 45 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index fe9f4e0..94bdd89 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Fix ALTER clustering column type from DateType to TimestampType when + using DESC clustering order (CASSANRDA-7797) * Stop inheriting liveRatio and liveRatioComputedAt from previous memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/src/java/org/apache/cassandra/db/marshal/ReversedType.java -- diff --git a/src/java/org/apache/cassandra/db/marshal/ReversedType.java b/src/java/org/apache/cassandra/db/marshal/ReversedType.java index cd61bbe..ffb0229 100644 --- a/src/java/org/apache/cassandra/db/marshal/ReversedType.java +++ b/src/java/org/apache/cassandra/db/marshal/ReversedType.java @@ -84,6 +84,15 @@ public class ReversedTypeT extends AbstractTypeT } @Override +public boolean isCompatibleWith(AbstractType? otherType) +{ +if (!(otherType instanceof ReversedType)) +return false; + +return this.baseType.isCompatibleWith(((ReversedType) otherType).baseType); +} + +@Override public boolean isValueCompatibleWith(AbstractType? otherType) { return this.baseType.isValueCompatibleWith(otherType); http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/test/unit/org/apache/cassandra/cql3/TypeTest.java -- diff --git a/test/unit/org/apache/cassandra/cql3/TypeTest.java b/test/unit/org/apache/cassandra/cql3/TypeTest.java index f911a44..b08ca2c 100644 --- a/test/unit/org/apache/cassandra/cql3/TypeTest.java +++ b/test/unit/org/apache/cassandra/cql3/TypeTest.java @@ -19,6 +19,7 @@ package org.apache.cassandra.cql3; import org.apache.cassandra.SchemaLoader; import org.apache.cassandra.db.ConsistencyLevel; +import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.exceptions.RequestExecutionException; import org.apache.cassandra.exceptions.RequestValidationException; import org.apache.cassandra.gms.Gossiper; @@ -35,6 +36,7 @@ import org.slf4j.LoggerFactory; import static org.apache.cassandra.cql3.QueryProcessor.process; import static org.apache.cassandra.cql3.QueryProcessor.processInternal; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; public class TypeTest { @@ -141,4 +143,36 @@ public class TypeTest results = executePrepared(prepare(select), QueryOptions.DEFAULT); assertEquals(2, results.size()); } + +@Test +// tests CASSANDRA-7797 +public void testAlterReversedColumn() throws Throwable +{ +executeSchemaChange(CREATE TABLE IF NOT EXISTS %s.test_alter_reversed (a int, b 'org.apache.cassandra.db.marshal.DateType', PRIMARY KEY (a, b)) WITH CLUSTERING ORDER BY (b DESC)); +executeSchemaChange(ALTER TABLE %s.test_alter_reversed ALTER b TYPE 'org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimestampType)'); +} + +@Test +public void testIncompatibleReversedTypes() throws Throwable +{ +executeSchemaChange(CREATE TABLE IF NOT EXISTS %s.test_incompatible_reversed (a int, b 'org.apache.cassandra.db.marshal.DateType', PRIMARY KEY (a, b)) WITH CLUSTERING ORDER BY (b DESC)); +try +{ +executeSchemaChange(ALTER TABLE %s.test_incompatible_reversed ALTER b TYPE 'org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType)'); +fail(Expected error for ALTER statement); +}
[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt test/unit/org/apache/cassandra/cql3/TypeTest.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d3450570 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d3450570 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d3450570 Branch: refs/heads/cassandra-2.1.0 Commit: d3450570ca89ce358355003ef5476dec3fad3e91 Parents: 45159ae a4e108c Author: Tyler Hobbs ty...@datastax.com Authored: Wed Aug 20 11:13:44 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Aug 20 11:13:44 2014 -0500 -- CHANGES.txt | 4 ++- .../cassandra/db/marshal/ReversedType.java | 9 + .../org/apache/cassandra/cql3/CQLTester.java| 7 .../org/apache/cassandra/cql3/TypeTest.java | 37 +++- 4 files changed, 55 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3450570/CHANGES.txt -- diff --cc CHANGES.txt index ebd74b2,94bdd89..8fac3b1 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,40 -1,24 +1,42 @@@ +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) - Merged from 2.0: + 2.0.10 + * Fix ALTER clustering column type from DateType to TimestampType when +using DESC clustering order (CASSANRDA-7797) - * Stop inheriting liveRatio and liveRatioComputedAt from previous - memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) +Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3450570/src/java/org/apache/cassandra/db/marshal/ReversedType.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3450570/test/unit/org/apache/cassandra/cql3/CQLTester.java -- diff --cc test/unit/org/apache/cassandra/cql3/CQLTester.java index 442c8b1,000..3dbff1e mode 100644,00..100644 ---
[2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt test/unit/org/apache/cassandra/cql3/TypeTest.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d3450570 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d3450570 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d3450570 Branch: refs/heads/cassandra-2.1 Commit: d3450570ca89ce358355003ef5476dec3fad3e91 Parents: 45159ae a4e108c Author: Tyler Hobbs ty...@datastax.com Authored: Wed Aug 20 11:13:44 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Aug 20 11:13:44 2014 -0500 -- CHANGES.txt | 4 ++- .../cassandra/db/marshal/ReversedType.java | 9 + .../org/apache/cassandra/cql3/CQLTester.java| 7 .../org/apache/cassandra/cql3/TypeTest.java | 37 +++- 4 files changed, 55 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3450570/CHANGES.txt -- diff --cc CHANGES.txt index ebd74b2,94bdd89..8fac3b1 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,40 -1,24 +1,42 @@@ +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) - Merged from 2.0: + 2.0.10 + * Fix ALTER clustering column type from DateType to TimestampType when +using DESC clustering order (CASSANRDA-7797) - * Stop inheriting liveRatio and liveRatioComputedAt from previous - memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) +Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3450570/src/java/org/apache/cassandra/db/marshal/ReversedType.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3450570/test/unit/org/apache/cassandra/cql3/CQLTester.java -- diff --cc test/unit/org/apache/cassandra/cql3/CQLTester.java index 442c8b1,000..3dbff1e mode 100644,00..100644 ---
[3/3] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8d494c78 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8d494c78 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8d494c78 Branch: refs/heads/cassandra-2.1 Commit: 8d494c782dea42f2058a18d63ff27e70f7e64a8f Parents: cc79fe1 d345057 Author: Tyler Hobbs ty...@datastax.com Authored: Wed Aug 20 11:14:13 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Aug 20 11:14:13 2014 -0500 -- CHANGES.txt | 4 ++- .../cassandra/db/marshal/ReversedType.java | 9 + .../org/apache/cassandra/cql3/CQLTester.java| 7 .../org/apache/cassandra/cql3/TypeTest.java | 37 +++- 4 files changed, 55 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8d494c78/CHANGES.txt --
[1/3] git commit: Fix ReversedType.isCompatibleWith()
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 cc79fe1a1 - 8d494c782 Fix ReversedType.isCompatibleWith() Patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-7797 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a4e108c4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a4e108c4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a4e108c4 Branch: refs/heads/cassandra-2.1 Commit: a4e108c40b234fa754a56a21b63635b83f90aceb Parents: 4fc417c Author: Tyler Hobbs ty...@datastax.com Authored: Wed Aug 20 10:58:54 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Aug 20 11:01:28 2014 -0500 -- CHANGES.txt | 2 ++ .../cassandra/db/marshal/ReversedType.java | 9 ++ .../org/apache/cassandra/cql3/TypeTest.java | 34 3 files changed, 45 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index fe9f4e0..94bdd89 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Fix ALTER clustering column type from DateType to TimestampType when + using DESC clustering order (CASSANRDA-7797) * Stop inheriting liveRatio and liveRatioComputedAt from previous memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/src/java/org/apache/cassandra/db/marshal/ReversedType.java -- diff --git a/src/java/org/apache/cassandra/db/marshal/ReversedType.java b/src/java/org/apache/cassandra/db/marshal/ReversedType.java index cd61bbe..ffb0229 100644 --- a/src/java/org/apache/cassandra/db/marshal/ReversedType.java +++ b/src/java/org/apache/cassandra/db/marshal/ReversedType.java @@ -84,6 +84,15 @@ public class ReversedTypeT extends AbstractTypeT } @Override +public boolean isCompatibleWith(AbstractType? otherType) +{ +if (!(otherType instanceof ReversedType)) +return false; + +return this.baseType.isCompatibleWith(((ReversedType) otherType).baseType); +} + +@Override public boolean isValueCompatibleWith(AbstractType? otherType) { return this.baseType.isValueCompatibleWith(otherType); http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/test/unit/org/apache/cassandra/cql3/TypeTest.java -- diff --git a/test/unit/org/apache/cassandra/cql3/TypeTest.java b/test/unit/org/apache/cassandra/cql3/TypeTest.java index f911a44..b08ca2c 100644 --- a/test/unit/org/apache/cassandra/cql3/TypeTest.java +++ b/test/unit/org/apache/cassandra/cql3/TypeTest.java @@ -19,6 +19,7 @@ package org.apache.cassandra.cql3; import org.apache.cassandra.SchemaLoader; import org.apache.cassandra.db.ConsistencyLevel; +import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.exceptions.RequestExecutionException; import org.apache.cassandra.exceptions.RequestValidationException; import org.apache.cassandra.gms.Gossiper; @@ -35,6 +36,7 @@ import org.slf4j.LoggerFactory; import static org.apache.cassandra.cql3.QueryProcessor.process; import static org.apache.cassandra.cql3.QueryProcessor.processInternal; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; public class TypeTest { @@ -141,4 +143,36 @@ public class TypeTest results = executePrepared(prepare(select), QueryOptions.DEFAULT); assertEquals(2, results.size()); } + +@Test +// tests CASSANDRA-7797 +public void testAlterReversedColumn() throws Throwable +{ +executeSchemaChange(CREATE TABLE IF NOT EXISTS %s.test_alter_reversed (a int, b 'org.apache.cassandra.db.marshal.DateType', PRIMARY KEY (a, b)) WITH CLUSTERING ORDER BY (b DESC)); +executeSchemaChange(ALTER TABLE %s.test_alter_reversed ALTER b TYPE 'org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimestampType)'); +} + +@Test +public void testIncompatibleReversedTypes() throws Throwable +{ +executeSchemaChange(CREATE TABLE IF NOT EXISTS %s.test_incompatible_reversed (a int, b 'org.apache.cassandra.db.marshal.DateType', PRIMARY KEY (a, b)) WITH CLUSTERING ORDER BY (b DESC)); +try +{ +executeSchemaChange(ALTER TABLE %s.test_incompatible_reversed ALTER b TYPE 'org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType)'); +fail(Expected error for ALTER statement); +} +
[3/4] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8d494c78 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8d494c78 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8d494c78 Branch: refs/heads/trunk Commit: 8d494c782dea42f2058a18d63ff27e70f7e64a8f Parents: cc79fe1 d345057 Author: Tyler Hobbs ty...@datastax.com Authored: Wed Aug 20 11:14:13 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Aug 20 11:14:13 2014 -0500 -- CHANGES.txt | 4 ++- .../cassandra/db/marshal/ReversedType.java | 9 + .../org/apache/cassandra/cql3/CQLTester.java| 7 .../org/apache/cassandra/cql3/TypeTest.java | 37 +++- 4 files changed, 55 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/8d494c78/CHANGES.txt --
[1/4] git commit: Fix ReversedType.isCompatibleWith()
Repository: cassandra Updated Branches: refs/heads/trunk c158efdf6 - 0f530413c Fix ReversedType.isCompatibleWith() Patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-7797 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a4e108c4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a4e108c4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a4e108c4 Branch: refs/heads/trunk Commit: a4e108c40b234fa754a56a21b63635b83f90aceb Parents: 4fc417c Author: Tyler Hobbs ty...@datastax.com Authored: Wed Aug 20 10:58:54 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Aug 20 11:01:28 2014 -0500 -- CHANGES.txt | 2 ++ .../cassandra/db/marshal/ReversedType.java | 9 ++ .../org/apache/cassandra/cql3/TypeTest.java | 34 3 files changed, 45 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index fe9f4e0..94bdd89 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,6 @@ 2.0.10 + * Fix ALTER clustering column type from DateType to TimestampType when + using DESC clustering order (CASSANRDA-7797) * Stop inheriting liveRatio and liveRatioComputedAt from previous memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/src/java/org/apache/cassandra/db/marshal/ReversedType.java -- diff --git a/src/java/org/apache/cassandra/db/marshal/ReversedType.java b/src/java/org/apache/cassandra/db/marshal/ReversedType.java index cd61bbe..ffb0229 100644 --- a/src/java/org/apache/cassandra/db/marshal/ReversedType.java +++ b/src/java/org/apache/cassandra/db/marshal/ReversedType.java @@ -84,6 +84,15 @@ public class ReversedTypeT extends AbstractTypeT } @Override +public boolean isCompatibleWith(AbstractType? otherType) +{ +if (!(otherType instanceof ReversedType)) +return false; + +return this.baseType.isCompatibleWith(((ReversedType) otherType).baseType); +} + +@Override public boolean isValueCompatibleWith(AbstractType? otherType) { return this.baseType.isValueCompatibleWith(otherType); http://git-wip-us.apache.org/repos/asf/cassandra/blob/a4e108c4/test/unit/org/apache/cassandra/cql3/TypeTest.java -- diff --git a/test/unit/org/apache/cassandra/cql3/TypeTest.java b/test/unit/org/apache/cassandra/cql3/TypeTest.java index f911a44..b08ca2c 100644 --- a/test/unit/org/apache/cassandra/cql3/TypeTest.java +++ b/test/unit/org/apache/cassandra/cql3/TypeTest.java @@ -19,6 +19,7 @@ package org.apache.cassandra.cql3; import org.apache.cassandra.SchemaLoader; import org.apache.cassandra.db.ConsistencyLevel; +import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.cassandra.exceptions.RequestExecutionException; import org.apache.cassandra.exceptions.RequestValidationException; import org.apache.cassandra.gms.Gossiper; @@ -35,6 +36,7 @@ import org.slf4j.LoggerFactory; import static org.apache.cassandra.cql3.QueryProcessor.process; import static org.apache.cassandra.cql3.QueryProcessor.processInternal; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; public class TypeTest { @@ -141,4 +143,36 @@ public class TypeTest results = executePrepared(prepare(select), QueryOptions.DEFAULT); assertEquals(2, results.size()); } + +@Test +// tests CASSANDRA-7797 +public void testAlterReversedColumn() throws Throwable +{ +executeSchemaChange(CREATE TABLE IF NOT EXISTS %s.test_alter_reversed (a int, b 'org.apache.cassandra.db.marshal.DateType', PRIMARY KEY (a, b)) WITH CLUSTERING ORDER BY (b DESC)); +executeSchemaChange(ALTER TABLE %s.test_alter_reversed ALTER b TYPE 'org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimestampType)'); +} + +@Test +public void testIncompatibleReversedTypes() throws Throwable +{ +executeSchemaChange(CREATE TABLE IF NOT EXISTS %s.test_incompatible_reversed (a int, b 'org.apache.cassandra.db.marshal.DateType', PRIMARY KEY (a, b)) WITH CLUSTERING ORDER BY (b DESC)); +try +{ +executeSchemaChange(ALTER TABLE %s.test_incompatible_reversed ALTER b TYPE 'org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType)'); +fail(Expected error for ALTER statement); +} +catch
[4/4] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0f530413 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0f530413 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0f530413 Branch: refs/heads/trunk Commit: 0f530413ccffd9b9611ce1c5a77c3f3cb7c65372 Parents: c158efd 8d494c7 Author: Tyler Hobbs ty...@datastax.com Authored: Wed Aug 20 11:14:41 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Aug 20 11:14:41 2014 -0500 -- CHANGES.txt | 4 ++- .../cassandra/db/marshal/ReversedType.java | 9 + .../org/apache/cassandra/cql3/CQLTester.java| 7 .../org/apache/cassandra/cql3/TypeTest.java | 37 +++- 4 files changed, 55 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/0f530413/CHANGES.txt --
[2/4] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Conflicts: CHANGES.txt test/unit/org/apache/cassandra/cql3/TypeTest.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d3450570 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d3450570 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d3450570 Branch: refs/heads/trunk Commit: d3450570ca89ce358355003ef5476dec3fad3e91 Parents: 45159ae a4e108c Author: Tyler Hobbs ty...@datastax.com Authored: Wed Aug 20 11:13:44 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Aug 20 11:13:44 2014 -0500 -- CHANGES.txt | 4 ++- .../cassandra/db/marshal/ReversedType.java | 9 + .../org/apache/cassandra/cql3/CQLTester.java| 7 .../org/apache/cassandra/cql3/TypeTest.java | 37 +++- 4 files changed, 55 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3450570/CHANGES.txt -- diff --cc CHANGES.txt index ebd74b2,94bdd89..8fac3b1 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,40 -1,24 +1,42 @@@ +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) - Merged from 2.0: + 2.0.10 + * Fix ALTER clustering column type from DateType to TimestampType when +using DESC clustering order (CASSANRDA-7797) - * Stop inheriting liveRatio and liveRatioComputedAt from previous - memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) +Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3450570/src/java/org/apache/cassandra/db/marshal/ReversedType.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3450570/test/unit/org/apache/cassandra/cql3/CQLTester.java -- diff --cc test/unit/org/apache/cassandra/cql3/CQLTester.java index 442c8b1,000..3dbff1e mode 100644,00..100644 ---
[Cassandra Wiki] Update of Committers by AlekseyYeschenko
Dear Wiki user, You have subscribed to a wiki page or wiki category on Cassandra Wiki for change notification. The Committers page has been changed by AlekseyYeschenko: https://wiki.apache.org/cassandra/Committers?action=diffrev1=47rev2=48 ||Peter Schuller ||Feb 2012 ||Twitter || || ||Dave Brosius ||May 2012 ||Independent ||Also a [[http://commons.apache.org|Commons]] committer || ||Yuki Morishita ||May 2012 ||Datastax || || - ||Aleksey Yeschenko ||Nov 2012 ||Datastax || || + ||Aleksey Yeschenko ||Nov 2012 ||Datastax ||PMC member || ||Jason Brown ||Feb 2013 ||Apple || || ||Marcus Eriksson ||April 2013 ||Datastax || || ||Mikhail Stepura ||January 2014 ||nScaled || ||
[jira] [Updated] (CASSANDRA-7507) OOM creates unreliable state - die instantly better
[ https://issues.apache.org/jira/browse/CASSANDRA-7507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-7507: -- Reviewer: Aleksey Yeschenko [~iamaleksey] to review OOM creates unreliable state - die instantly better --- Key: CASSANDRA-7507 URL: https://issues.apache.org/jira/browse/CASSANDRA-7507 Project: Cassandra Issue Type: New Feature Reporter: Karl Mueller Assignee: Joshua McKenzie Priority: Minor Fix For: 2.1.1 Attachments: 7507_v1.txt, 7507_v2.txt, 7507_v3_build.txt, 7507_v3_java.txt, exceptionHandlingResults.txt, findSwallowedExceptions.py I had a cassandra node run OOM. My heap had enough headroom, there was just something which either was a bug or some unfortunate amount of short-term memory utilization. This resulted in the following error: WARN [StorageServiceShutdownHook] 2014-06-30 09:38:38,251 StorageProxy.java (line 1713) Some hints were not written before shutdown. This is not supposed to happen. You should (a) run repair, and (b) file a bug report There are no other messages of relevance besides the OOM error about 90 minutes earlier. My (limited) understanding of the JVM and Cassandra says that when it goes OOM, it will attempt to signal cassandra to shut down cleanly. The problem, in my view, is that with an OOM situation, nothing is guaranteed anymore. I believe it's impossible to reliably cleanly shut down at this point, and therefore it's wrong to even try. Yes, ideally things could be written out, flushed to disk, memory messages written, other nodes notified, etc. but why is there any reason to believe any of those steps could happen? Would happen? Couldn't bad data be written at this point to disk rather than good data? Some network messages delivered, but not others? I think Cassandra should have the option to (and possibly default) to kill itself immediately upon the OOM condition happening in a hard way, and not rely on the java-based clean shutdown process. Cassandra already handles recovery from unclean shutdown, and it's not a big deal. My node, for example, kept in a sort-of alive state for 90 minutes where who knows what it was doing or not doing. I don't know enough about the JVM and options for it to know the best exact implementation of die instantly on OOM, but it should be something that's possible either with some flags or a C library (which doesn't rely on java memory to do something which it may not be able to get!) Short version: a kill -9 of all C* processes in that instance without needing more java memory, when OOM is raised -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7659) cqlsh: DESCRIBE KEYSPACE should order types according to cross-type dependencies
[ https://issues.apache.org/jira/browse/CASSANDRA-7659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tyler Hobbs updated CASSANDRA-7659: --- Attachment: 7659-2.1.txt 7659-2.1.txt uses the python driver to describe UDTs. I also did some minor cleanup in cql3handling.py to make my linter happy :) cqlsh: DESCRIBE KEYSPACE should order types according to cross-type dependencies Key: CASSANDRA-7659 URL: https://issues.apache.org/jira/browse/CASSANDRA-7659 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Tyler Hobbs Assignee: Tyler Hobbs Priority: Minor Labels: lhf Fix For: 2.1.1 Attachments: 7659-2.1.txt Since UDTs may use other UDTs for fields, DESCRIBE KEYSPACE should list types in an order that handles the dependencies. This was recently done in the python driver here: https://github.com/datastax/python-driver/pull/165. We can either update to the latest python driver, or copy that code for cqlsh. -- This message was sent by Atlassian JIRA (v6.2#6252)
[05/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/da457867 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/da457867 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/da457867 Branch: refs/heads/cassandra-2.1 Commit: da45786788b58f272edf1e4f091c43b640f4a338 Parents: d345057 44cfd95 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 20 10:00:47 2014 -0700 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 20 10:01:09 2014 -0700 -- CHANGES.txt | 4 ++-- src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/da457867/CHANGES.txt -- diff --cc CHANGES.txt index 8fac3b1,17c0671..2664f0f --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,42 -1,25 +1,42 @@@ -2.0.10 +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) - 2.0.10 ++Merged from 2.0: + * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) * Fix ALTER clustering column type from DateType to TimestampType when using DESC clustering order (CASSANRDA-7797) - * Stop inheriting liveRatio and liveRatioComputedAt from previous - memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) - Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226) http://git-wip-us.apache.org/repos/asf/cassandra/blob/da457867/src/java/org/apache/cassandra/config/CFMetaData.java --
[01/10] git commit: Configure system.paxos with LeveledCompactionStrategy patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7753
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 a4e108c40 - 44cfd958a refs/heads/cassandra-2.1 8d494c782 - ab45a78d6 refs/heads/cassandra-2.1.0 d3450570c - da4578678 refs/heads/trunk 0f530413c - 753ccff52 Configure system.paxos with LeveledCompactionStrategy patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7753 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/44cfd958 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/44cfd958 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/44cfd958 Branch: refs/heads/cassandra-2.0 Commit: 44cfd958a4b59c2e13881b42e2ba34db64dd64e8 Parents: a4e108c Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 20 10:00:34 2014 -0700 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 20 10:00:34 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/44cfd958/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 94bdd89..17c0671 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.10 + * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) * Fix ALTER clustering column type from DateType to TimestampType when using DESC clustering order (CASSANRDA-7797) * Stop inheriting liveRatio and liveRatioComputedAt from previous http://git-wip-us.apache.org/repos/asf/cassandra/blob/44cfd958/src/java/org/apache/cassandra/config/CFMetaData.java -- diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java index 296ecce..07c696f 100644 --- a/src/java/org/apache/cassandra/config/CFMetaData.java +++ b/src/java/org/apache/cassandra/config/CFMetaData.java @@ -260,7 +260,8 @@ public final class CFMetaData + most_recent_commit_at timeuuid, + most_recent_commit blob, + PRIMARY KEY (row_key, cf_id) - + ) WITH COMMENT='in-progress paxos proposals'); + + ) WITH COMMENT='in-progress paxos proposals' + + AND COMPACTION={'class' : 'LeveledCompactionStrategy'}); public static final CFMetaData SSTableActivityCF = compile(CREATE TABLE + SystemKeyspace.SSTABLE_ACTIVITY_CF + ( + keyspace_name text,
[08/10] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ab45a78d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ab45a78d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ab45a78d Branch: refs/heads/trunk Commit: ab45a78d6c73c9c0d0d8ebc27f168e3105df7e23 Parents: 8d494c7 da45786 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 20 10:01:20 2014 -0700 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 20 10:01:20 2014 -0700 -- CHANGES.txt | 4 ++-- src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ab45a78d/CHANGES.txt --
[04/10] git commit: Configure system.paxos with LeveledCompactionStrategy patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7753
Configure system.paxos with LeveledCompactionStrategy patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7753 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/44cfd958 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/44cfd958 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/44cfd958 Branch: refs/heads/trunk Commit: 44cfd958a4b59c2e13881b42e2ba34db64dd64e8 Parents: a4e108c Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 20 10:00:34 2014 -0700 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 20 10:00:34 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/44cfd958/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 94bdd89..17c0671 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.10 + * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) * Fix ALTER clustering column type from DateType to TimestampType when using DESC clustering order (CASSANRDA-7797) * Stop inheriting liveRatio and liveRatioComputedAt from previous http://git-wip-us.apache.org/repos/asf/cassandra/blob/44cfd958/src/java/org/apache/cassandra/config/CFMetaData.java -- diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java index 296ecce..07c696f 100644 --- a/src/java/org/apache/cassandra/config/CFMetaData.java +++ b/src/java/org/apache/cassandra/config/CFMetaData.java @@ -260,7 +260,8 @@ public final class CFMetaData + most_recent_commit_at timeuuid, + most_recent_commit blob, + PRIMARY KEY (row_key, cf_id) - + ) WITH COMMENT='in-progress paxos proposals'); + + ) WITH COMMENT='in-progress paxos proposals' + + AND COMPACTION={'class' : 'LeveledCompactionStrategy'}); public static final CFMetaData SSTableActivityCF = compile(CREATE TABLE + SystemKeyspace.SSTABLE_ACTIVITY_CF + ( + keyspace_name text,
[10/10] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/753ccff5 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/753ccff5 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/753ccff5 Branch: refs/heads/trunk Commit: 753ccff524a45519c9e63da755aa16a384ca4bb8 Parents: 0f53041 ab45a78 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 20 10:01:47 2014 -0700 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 20 10:01:47 2014 -0700 -- CHANGES.txt | 4 ++-- src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/753ccff5/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/753ccff5/src/java/org/apache/cassandra/config/CFMetaData.java --
[06/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/da457867 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/da457867 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/da457867 Branch: refs/heads/cassandra-2.1.0 Commit: da45786788b58f272edf1e4f091c43b640f4a338 Parents: d345057 44cfd95 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 20 10:00:47 2014 -0700 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 20 10:01:09 2014 -0700 -- CHANGES.txt | 4 ++-- src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/da457867/CHANGES.txt -- diff --cc CHANGES.txt index 8fac3b1,17c0671..2664f0f --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,42 -1,25 +1,42 @@@ -2.0.10 +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) - 2.0.10 ++Merged from 2.0: + * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) * Fix ALTER clustering column type from DateType to TimestampType when using DESC clustering order (CASSANRDA-7797) - * Stop inheriting liveRatio and liveRatioComputedAt from previous - memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) - Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226) http://git-wip-us.apache.org/repos/asf/cassandra/blob/da457867/src/java/org/apache/cassandra/config/CFMetaData.java --
[02/10] git commit: Configure system.paxos with LeveledCompactionStrategy patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7753
Configure system.paxos with LeveledCompactionStrategy patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7753 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/44cfd958 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/44cfd958 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/44cfd958 Branch: refs/heads/cassandra-2.1.0 Commit: 44cfd958a4b59c2e13881b42e2ba34db64dd64e8 Parents: a4e108c Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 20 10:00:34 2014 -0700 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 20 10:00:34 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/44cfd958/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 94bdd89..17c0671 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.10 + * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) * Fix ALTER clustering column type from DateType to TimestampType when using DESC clustering order (CASSANRDA-7797) * Stop inheriting liveRatio and liveRatioComputedAt from previous http://git-wip-us.apache.org/repos/asf/cassandra/blob/44cfd958/src/java/org/apache/cassandra/config/CFMetaData.java -- diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java index 296ecce..07c696f 100644 --- a/src/java/org/apache/cassandra/config/CFMetaData.java +++ b/src/java/org/apache/cassandra/config/CFMetaData.java @@ -260,7 +260,8 @@ public final class CFMetaData + most_recent_commit_at timeuuid, + most_recent_commit blob, + PRIMARY KEY (row_key, cf_id) - + ) WITH COMMENT='in-progress paxos proposals'); + + ) WITH COMMENT='in-progress paxos proposals' + + AND COMPACTION={'class' : 'LeveledCompactionStrategy'}); public static final CFMetaData SSTableActivityCF = compile(CREATE TABLE + SystemKeyspace.SSTABLE_ACTIVITY_CF + ( + keyspace_name text,
[03/10] git commit: Configure system.paxos with LeveledCompactionStrategy patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7753
Configure system.paxos with LeveledCompactionStrategy patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7753 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/44cfd958 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/44cfd958 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/44cfd958 Branch: refs/heads/cassandra-2.1 Commit: 44cfd958a4b59c2e13881b42e2ba34db64dd64e8 Parents: a4e108c Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 20 10:00:34 2014 -0700 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 20 10:00:34 2014 -0700 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/44cfd958/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 94bdd89..17c0671 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.10 + * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) * Fix ALTER clustering column type from DateType to TimestampType when using DESC clustering order (CASSANRDA-7797) * Stop inheriting liveRatio and liveRatioComputedAt from previous http://git-wip-us.apache.org/repos/asf/cassandra/blob/44cfd958/src/java/org/apache/cassandra/config/CFMetaData.java -- diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java index 296ecce..07c696f 100644 --- a/src/java/org/apache/cassandra/config/CFMetaData.java +++ b/src/java/org/apache/cassandra/config/CFMetaData.java @@ -260,7 +260,8 @@ public final class CFMetaData + most_recent_commit_at timeuuid, + most_recent_commit blob, + PRIMARY KEY (row_key, cf_id) - + ) WITH COMMENT='in-progress paxos proposals'); + + ) WITH COMMENT='in-progress paxos proposals' + + AND COMPACTION={'class' : 'LeveledCompactionStrategy'}); public static final CFMetaData SSTableActivityCF = compile(CREATE TABLE + SystemKeyspace.SSTABLE_ACTIVITY_CF + ( + keyspace_name text,
[07/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/da457867 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/da457867 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/da457867 Branch: refs/heads/trunk Commit: da45786788b58f272edf1e4f091c43b640f4a338 Parents: d345057 44cfd95 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 20 10:00:47 2014 -0700 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 20 10:01:09 2014 -0700 -- CHANGES.txt | 4 ++-- src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/da457867/CHANGES.txt -- diff --cc CHANGES.txt index 8fac3b1,17c0671..2664f0f --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,42 -1,25 +1,42 @@@ -2.0.10 +2.1.0 + * (cqlsh) Fix COPY FROM handling of null/empty primary key + values (CASSANDRA-7792) + * Fix ordering of static cells (CASSANDRA-7763) - 2.0.10 ++Merged from 2.0: + * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) * Fix ALTER clustering column type from DateType to TimestampType when using DESC clustering order (CASSANRDA-7797) - * Stop inheriting liveRatio and liveRatioComputedAt from previous - memtables (CASSANDRA-7796) * Throw EOFException if we run out of chunks in compressed datafile (CASSANDRA-7664) - * Throw InvalidRequestException when queries contain relations on entire - collection columns (CASSANDRA-7506) * Fix PRSI handling of CQL3 row markers for row cleanup (CASSANDRA-7787) - * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) * Fix dropping collection when it's the last regular column (CASSANDRA-7744) * Properly reject operations on list index with conditions (CASSANDRA-7499) - * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * Make StreamReceiveTask thread safe and gc friendly (CASSANDRA-7795) - Merged from 1.2: + * Validate empty cell names from counter updates (CASSANDRA-7798) + + +2.1.0-rc6 + * Fix OOM issue from netty caching over time (CASSANDRA-7743) + * json2sstable couldn't import JSON for CQL table (CASSANDRA-7477) + * Invalidate all caches on table drop (CASSANDRA-7561) + * Skip strict endpoint selection for ranges if RF == nodes (CASSANRA-7765) + * Fix Thrift range filtering without 2ary index lookups (CASSANDRA-7741) + * Add tracing entries about concurrent range requests (CASSANDRA-7599) + * (cqlsh) Fix DESCRIBE for NTS keyspaces (CASSANDRA-7729) + * Remove netty buffer ref-counting (CASSANDRA-7735) + * Pass mutated cf to index updater for use by PRSI (CASSANDRA-7742) + * Include stress yaml example in release and deb (CASSANDRA-7717) + * workaround for netty issue causing corrupted data off the wire (CASSANDRA-7695) + * cqlsh DESC CLUSTER fails retrieving ring information (CASSANDRA-7687) + * Fix binding null values inside UDT (CASSANDRA-7685) + * Fix UDT field selection with empty fields (CASSANDRA-7670) + * Bogus deserialization of static cells from sstable (CASSANDRA-7684) + * Fix NPE on compaction leftover cleanup for dropped table (CASSANDRA-7770) +Merged from 2.0: * (cqlsh) Wait up to 10 sec for a tracing session (CASSANDRA-7222) * Fix NPE in FileCacheService.sizeInBytes (CASSANDRA-7756) - * (cqlsh) cqlsh should automatically disable tracing when selecting - from system_traces (CASSANDRA-7641) - * (Hadoop) Add CqlOutputFormat (CASSANDRA-6927) - * Don't depend on cassandra config for nodetool ring (CASSANDRA-7508) - * (cqlsh) Fix failing cqlsh formatting tests (CASSANDRA-7703) + * Remove duplicates from StorageService.getJoiningNodes (CASSANDRA-7478) + * Clone token map outside of hot gossip loops (CASSANDRA-7758) * Fix MS expiring map timeout for Paxos messages (CASSANDRA-7752) * Do not flush on truncate if durable_writes is false (CASSANDRA-7750) * Give CRR a default input_cql Statement (CASSANDRA-7226) http://git-wip-us.apache.org/repos/asf/cassandra/blob/da457867/src/java/org/apache/cassandra/config/CFMetaData.java --
[09/10] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ab45a78d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ab45a78d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ab45a78d Branch: refs/heads/cassandra-2.1 Commit: ab45a78d6c73c9c0d0d8ebc27f168e3105df7e23 Parents: 8d494c7 da45786 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Aug 20 10:01:20 2014 -0700 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Aug 20 10:01:20 2014 -0700 -- CHANGES.txt | 4 ++-- src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ab45a78d/CHANGES.txt --
[jira] [Comment Edited] (CASSANDRA-7671) cqlsh: Error when printing results of conditional updates
[ https://issues.apache.org/jira/browse/CASSANDRA-7671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14086751#comment-14086751 ] Tyler Hobbs edited comment on CASSANDRA-7671 at 8/20/14 5:01 PM: - It looks like this is just a problem with 2.1 and trunk, not 2.1.0. was (Author: thobbs): It looks like this is just a problem with trunk, not 2.1.0. cqlsh: Error when printing results of conditional updates - Key: CASSANDRA-7671 URL: https://issues.apache.org/jira/browse/CASSANDRA-7671 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Tyler Hobbs Assignee: Tyler Hobbs Fix For: 2.1.1, 3.0 {noformat} cqlsh INSERT INTO demo.kv (key, value) VALUES (1, 1) IF NOT EXISTS; print_static_result() takes exactly 3 arguments (2 given) {noformat} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7671) cqlsh: Error when printing results of conditional updates
[ https://issues.apache.org/jira/browse/CASSANDRA-7671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tyler Hobbs updated CASSANDRA-7671: --- Fix Version/s: 2.1.1 cqlsh: Error when printing results of conditional updates - Key: CASSANDRA-7671 URL: https://issues.apache.org/jira/browse/CASSANDRA-7671 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Tyler Hobbs Assignee: Tyler Hobbs Fix For: 2.1.1, 3.0 {noformat} cqlsh INSERT INTO demo.kv (key, value) VALUES (1, 1) IF NOT EXISTS; print_static_result() takes exactly 3 arguments (2 given) {noformat} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7802) Need to export JVM_OPTS from init.d script
[ https://issues.apache.org/jira/browse/CASSANDRA-7802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-7802: -- Reviewer: Michael Shuler Reproduced In: 2.1 rc6, 2.0.9 (was: 2.0.9, 2.1 rc6) [~mshuler] to review Need to export JVM_OPTS from init.d script -- Key: CASSANDRA-7802 URL: https://issues.apache.org/jira/browse/CASSANDRA-7802 Project: Cassandra Issue Type: Bug Components: Packaging Environment: Debian/Ubuntu Reporter: Matt Robenolt Priority: Minor Labels: patch Fix For: 2.0.9, 2.0.10, 2.1 rc6 Attachments: 42.diff Since 2.0, the init.d script was refactored and requires JVM variables to be exported for them to actually be picked up and used. In this case, JVM_OPTS never gets exported, so user defined variables from /etc/default/cassandra are never applied. This also affects the latest 2.1 rc, and I assume all previous versions. Pull request: https://github.com/apache/cassandra/pull/42 Diff: https://github.com/apache/cassandra/pull/42.diff Patch: https://github.com/apache/cassandra/pull/42.patch -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-7753) Level compaction for Paxos table
[ https://issues.apache.org/jira/browse/CASSANDRA-7753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14104131#comment-14104131 ] Jonathan Ellis commented on CASSANDRA-7753: --- LGTM, committed Level compaction for Paxos table Key: CASSANDRA-7753 URL: https://issues.apache.org/jira/browse/CASSANDRA-7753 Project: Cassandra Issue Type: Improvement Reporter: sankalp kohli Assignee: sankalp kohli Priority: Minor Fix For: 2.0.10, 2.1.0 Attachments: CASSANDRA-7753.patch Paxos table uses size tiered compaction which causes stable per read to be high. Converting to level has improved the performance. I think we should consider making this as default or to change the default setting of size tiered. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-7774) CqlRecordReader creates wrong cluster if the first replica of a split is down
[ https://issues.apache.org/jira/browse/CASSANDRA-7774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremiah Jordan updated CASSANDRA-7774: --- Fix Version/s: 2.0.10 CqlRecordReader creates wrong cluster if the first replica of a split is down - Key: CASSANDRA-7774 URL: https://issues.apache.org/jira/browse/CASSANDRA-7774 Project: Cassandra Issue Type: Bug Components: Hadoop Reporter: Jacek Lewandowski Assignee: Jacek Lewandowski Fix For: 2.0.10 Attachments: 0001-CASSANDRA-7774-Fixed-cluster-initialisation-for-a-sp.patch, CASSANDRA-7774-patch-v2.patch For a given split, {{CqlRecordReader}} gets a list of replicas of that split. Then, it tries to create a Cluster object with a ClusterBuilder for each replica separately in a loop, so that if the cluster creation fails for a certain replica, the next replica is tried. Unfortunately it does not work, because the cluster creation does not fail if the provided contact point is down. So, it always selects the first replica regardless of its state. The solution is quite simple - {{ClusterBuilder}} accepts a collection of contact points - at least one of them must be up. So instead of iterating over the replicas we can pass the whole set of them and the driver will select the working one. It will follow some changes in the load balancing policy - I'm going to switch to use -the same- similar balancing policy -as- to the one we use in OSS Spark Connector. -- This message was sent by Atlassian JIRA (v6.2#6252)
git commit: (Hadoop) fix cluster initialisation for a split fetching
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 44cfd958a - fe39eb7a9 (Hadoop) fix cluster initialisation for a split fetching patch by Jacek Lewandowski; reviewed by Alex Liu for CASSANDRA-7774 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fe39eb7a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fe39eb7a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fe39eb7a Branch: refs/heads/cassandra-2.0 Commit: fe39eb7a9e2b017e3cd31b1c09693c8d565dee18 Parents: 44cfd95 Author: Jacek Lewandowski lewandowski.ja...@gmail.com Authored: Wed Aug 20 20:39:12 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 20:39:12 2014 +0300 -- CHANGES.txt | 1 + .../cassandra/hadoop/cql3/CqlConfigHelper.java | 89 + .../cassandra/hadoop/cql3/CqlRecordReader.java | 19 +- ...mitedLocalNodeFirstLocalBalancingPolicy.java | 185 +++ 4 files changed, 198 insertions(+), 96 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe39eb7a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 17c0671..71cfca0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.10 + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) * Fix ALTER clustering column type from DateType to TimestampType when using DESC clustering order (CASSANRDA-7797) http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe39eb7a/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java -- diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java index e894996..137bddf 100644 --- a/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java +++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java @@ -288,16 +288,22 @@ public class CqlConfigHelper public static Cluster getInputCluster(String host, Configuration conf) { +// this method has been left for backward compatibility +return getInputCluster(new String[] {host}, conf); +} + +public static Cluster getInputCluster(String[] hosts, Configuration conf) +{ int port = getInputNativePort(conf); OptionalAuthProvider authProvider = getAuthProvider(conf); OptionalSSLOptions sslOptions = getSSLOptions(conf); -LoadBalancingPolicy loadBalancingPolicy = getReadLoadBalancingPolicy(conf, host); +LoadBalancingPolicy loadBalancingPolicy = getReadLoadBalancingPolicy(conf, hosts); SocketOptions socketOptions = getReadSocketOptions(conf); QueryOptions queryOptions = getReadQueryOptions(conf); PoolingOptions poolingOptions = getReadPoolingOptions(conf); Cluster.Builder builder = Cluster.builder() - .addContactPoint(host) + .addContactPoints(hosts) .withPort(port) .withCompression(ProtocolOptions.Compression.NONE); @@ -480,84 +486,9 @@ public class CqlConfigHelper return socketOptions; } -private static LoadBalancingPolicy getReadLoadBalancingPolicy(Configuration conf, final String stickHost) +private static LoadBalancingPolicy getReadLoadBalancingPolicy(Configuration conf, final String[] stickHosts) { -return new LoadBalancingPolicy() -{ -private Host origHost; -private SetHost liveRemoteHosts = Sets.newHashSet(); - -@Override -public void onAdd(Host host) -{ -if (host.getAddress().getHostName().equals(stickHost)) -origHost = host; -} - -@Override -public void onDown(Host host) -{ -if (host.getAddress().getHostName().equals(stickHost)) -origHost = null; -liveRemoteHosts.remove(host); -} - -@Override -public void onRemove(Host host) -{ -if (host.getAddress().getHostName().equals(stickHost)) -origHost = null; -liveRemoteHosts.remove(host); -} - -@Override -public void onUp(Host host) -{ -if (host.getAddress().getHostName().equals(stickHost)) -origHost = host; -liveRemoteHosts.add(host); -
[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1.0
Merge branch 'cassandra-2.0' into cassandra-2.1.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/58554dec Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/58554dec Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/58554dec Branch: refs/heads/cassandra-2.1.0 Commit: 58554decc22c6754cc6ce4492ada65b5d8fbfcf9 Parents: da45786 fe39eb7 Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 20:42:48 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 20:42:48 2014 +0300 -- --
[4/4] git commit: Merge branch 'cassandra-2.1.0' into cassandra-2.1
Merge branch 'cassandra-2.1.0' into cassandra-2.1 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6e051257 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6e051257 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6e051257 Branch: refs/heads/cassandra-2.1 Commit: 6e0512576e5e920690ed1df1c920126dcb939010 Parents: ce747d7 58554de Author: Aleksey Yeschenko alek...@apache.org Authored: Wed Aug 20 20:43:23 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 20:43:23 2014 +0300 -- --
[1/2] git commit: (Hadoop) fix cluster initialisation for a split fetching
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1.0 da4578678 - 58554decc (Hadoop) fix cluster initialisation for a split fetching patch by Jacek Lewandowski; reviewed by Alex Liu for CASSANDRA-7774 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fe39eb7a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fe39eb7a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fe39eb7a Branch: refs/heads/cassandra-2.1.0 Commit: fe39eb7a9e2b017e3cd31b1c09693c8d565dee18 Parents: 44cfd95 Author: Jacek Lewandowski lewandowski.ja...@gmail.com Authored: Wed Aug 20 20:39:12 2014 +0300 Committer: Aleksey Yeschenko alek...@apache.org Committed: Wed Aug 20 20:39:12 2014 +0300 -- CHANGES.txt | 1 + .../cassandra/hadoop/cql3/CqlConfigHelper.java | 89 + .../cassandra/hadoop/cql3/CqlRecordReader.java | 19 +- ...mitedLocalNodeFirstLocalBalancingPolicy.java | 185 +++ 4 files changed, 198 insertions(+), 96 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe39eb7a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 17c0671..71cfca0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.10 + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) * Configure system.paxos with LeveledCompactionStrategy (CASSANDRA-7753) * Fix ALTER clustering column type from DateType to TimestampType when using DESC clustering order (CASSANRDA-7797) http://git-wip-us.apache.org/repos/asf/cassandra/blob/fe39eb7a/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java -- diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java index e894996..137bddf 100644 --- a/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java +++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlConfigHelper.java @@ -288,16 +288,22 @@ public class CqlConfigHelper public static Cluster getInputCluster(String host, Configuration conf) { +// this method has been left for backward compatibility +return getInputCluster(new String[] {host}, conf); +} + +public static Cluster getInputCluster(String[] hosts, Configuration conf) +{ int port = getInputNativePort(conf); OptionalAuthProvider authProvider = getAuthProvider(conf); OptionalSSLOptions sslOptions = getSSLOptions(conf); -LoadBalancingPolicy loadBalancingPolicy = getReadLoadBalancingPolicy(conf, host); +LoadBalancingPolicy loadBalancingPolicy = getReadLoadBalancingPolicy(conf, hosts); SocketOptions socketOptions = getReadSocketOptions(conf); QueryOptions queryOptions = getReadQueryOptions(conf); PoolingOptions poolingOptions = getReadPoolingOptions(conf); Cluster.Builder builder = Cluster.builder() - .addContactPoint(host) + .addContactPoints(hosts) .withPort(port) .withCompression(ProtocolOptions.Compression.NONE); @@ -480,84 +486,9 @@ public class CqlConfigHelper return socketOptions; } -private static LoadBalancingPolicy getReadLoadBalancingPolicy(Configuration conf, final String stickHost) +private static LoadBalancingPolicy getReadLoadBalancingPolicy(Configuration conf, final String[] stickHosts) { -return new LoadBalancingPolicy() -{ -private Host origHost; -private SetHost liveRemoteHosts = Sets.newHashSet(); - -@Override -public void onAdd(Host host) -{ -if (host.getAddress().getHostName().equals(stickHost)) -origHost = host; -} - -@Override -public void onDown(Host host) -{ -if (host.getAddress().getHostName().equals(stickHost)) -origHost = null; -liveRemoteHosts.remove(host); -} - -@Override -public void onRemove(Host host) -{ -if (host.getAddress().getHostName().equals(stickHost)) -origHost = null; -liveRemoteHosts.remove(host); -} - -@Override -public void onUp(Host host) -{ -if (host.getAddress().getHostName().equals(stickHost)) -origHost = host; -liveRemoteHosts.add(host); -