[5/7] git commit: Merge remote-tracking branch 'origin/cassandra-2.1' into cassandra-2.1
Merge remote-tracking branch 'origin/cassandra-2.1' 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/05541ebc Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/05541ebc Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/05541ebc Branch: refs/heads/trunk Commit: 05541ebca3f91d84b685049660dcaad05bfb2790 Parents: e105982 a490d7e Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 01:02:49 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 01:02:49 2014 -0500 -- bin/cqlsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --
[1/7] git commit: Include correct consistencyLevel in LWT timeout patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-6884
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 a490d7efa - 05541ebca refs/heads/trunk 3acba5bba - f10de1863 Include correct consistencyLevel in LWT timeout patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-6884 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f5e1cbca Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f5e1cbca Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f5e1cbca Branch: refs/heads/cassandra-2.1 Commit: f5e1cbca871e6e4cc7007177b2b0e9f367ae60ba Parents: 9269cb8 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 00:15:19 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 00:15:19 2014 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/StorageProxy.java | 16 .../service/paxos/AbstractPaxosCallback.java| 6 -- .../cassandra/service/paxos/PrepareCallback.java| 5 +++-- .../cassandra/service/paxos/ProposeCallback.java| 5 +++-- 5 files changed, 19 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5e1cbca/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 4741475..7eebd5b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.7 + * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514) * Add support for DELETE ... IF EXISTS to CQL3 (CASSANDRA-5708) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5e1cbca/src/java/org/apache/cassandra/service/StorageProxy.java -- diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java index fda9819..a6912c2 100644 --- a/src/java/org/apache/cassandra/service/StorageProxy.java +++ b/src/java/org/apache/cassandra/service/StorageProxy.java @@ -246,7 +246,7 @@ public class StorageProxy implements StorageProxyMBean Commit proposal = Commit.newProposal(key, ballot, updates); Tracing.trace(CAS precondition is met; proposing client-requested updates for {}, ballot); -if (proposePaxos(proposal, liveEndpoints, requiredParticipants, true)) +if (proposePaxos(proposal, liveEndpoints, requiredParticipants, true, consistencyForPaxos)) { if (consistencyForCommit == ConsistencyLevel.ANY) sendCommit(proposal, liveEndpoints); @@ -318,7 +318,7 @@ public class StorageProxy implements StorageProxyMBean // prepare Tracing.trace(Preparing {}, ballot); Commit toPrepare = Commit.newPrepare(key, metadata, ballot); -summary = preparePaxos(toPrepare, liveEndpoints, requiredParticipants); +summary = preparePaxos(toPrepare, liveEndpoints, requiredParticipants, consistencyForPaxos); if (!summary.promised) { Tracing.trace(Some replicas have already promised a higher ballot than ours; aborting); @@ -336,7 +336,7 @@ public class StorageProxy implements StorageProxyMBean { Tracing.trace(Finishing incomplete paxos round {}, inProgress); Commit refreshedInProgress = Commit.newProposal(inProgress.key, ballot, inProgress.update); -if (proposePaxos(refreshedInProgress, liveEndpoints, requiredParticipants, false)) +if (proposePaxos(refreshedInProgress, liveEndpoints, requiredParticipants, false, consistencyForPaxos)) { commitPaxos(refreshedInProgress, ConsistencyLevel.QUORUM); } @@ -381,10 +381,10 @@ public class StorageProxy implements StorageProxyMBean MessagingService.instance().sendOneWay(message, target); } -private static PrepareCallback preparePaxos(Commit toPrepare, ListInetAddress endpoints, int requiredParticipants) +private static PrepareCallback preparePaxos(Commit toPrepare, ListInetAddress endpoints, int requiredParticipants, ConsistencyLevel consistencyForPaxos) throws WriteTimeoutException { -PrepareCallback callback = new PrepareCallback(toPrepare.key, toPrepare.update.metadata(), requiredParticipants); +PrepareCallback callback = new PrepareCallback(toPrepare.key, toPrepare.update.metadata(), requiredParticipants, consistencyForPaxos); MessageOutCommit message = new MessageOutCommit(MessagingService.Verb.PAXOS_PREPARE, toPrepare, Commit.serializer); for
[3/7] git commit: merge from 2.0
merge from 2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e1059828 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e1059828 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e1059828 Branch: refs/heads/trunk Commit: e105982877ed32b69672d3431ee4ea57e1f93e4b Parents: 11a9618 f5e1cbc Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 00:15:45 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 00:15:45 2014 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/StorageProxy.java | 16 .../service/paxos/AbstractPaxosCallback.java| 6 -- .../cassandra/service/paxos/PrepareCallback.java| 5 +++-- .../cassandra/service/paxos/ProposeCallback.java| 5 +++-- 5 files changed, 19 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1059828/CHANGES.txt -- diff --cc CHANGES.txt index 9f66506,7eebd5b..81db5e2 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,29 -1,5 +1,30 @@@ -2.0.7 +2.1.0-beta2 + * Eliminate possibility of CL segment appearing twice in active list + (CASSANDRA-6557) + * Apply DONTNEED fadvise to commitlog segments (CASSANDRA-6759) + * Switch CRC component to Adler and include it for compressed sstables + (CASSANDRA-4165) + * Allow cassandra-stress to set compaction strategy options (CASSANDRA-6451) + * Add broadcast_rpc_address option to cassandra.yaml (CASSANDRA-5899) + * Auto reload GossipingPropertyFileSnitch config (CASSANDRA-5897) + * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573) + * Fix ABTC NPE and apply update function correctly (CASSANDRA-6692) + * Allow nodetool to use a file or prompt for password (CASSANDRA-6660) + * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742) + * Fix assertion error in ALTER TYPE RENAME (CASSANDRA-6705) + * Scrub should not always clear out repaired status (CASSANDRA-5351) + * Improve handling of range tombstone for wide partitions (CASSANDRA-6446) + * Fix ClassCastException for compact table with composites (CASSANDRA-6738) + * Fix potentially repairing with wrong nodes (CASSANDRA-6808) + * Change caching option syntax (CASSANDRA-6745) + * Fix stress to do proper counter reads (CASSANDRA-6835) + * Fix help message for stress counter_write (CASSANDRA-6824) + * Fix stress smart Thrift client to pick servers correctly (CASSANDRA-6848) + * Add logging levels (minimal, normal or verbose) to stress tool (CASSANDRA-6849) + * Fix race condition in Batch CLE (CASSANDRA-6860) + * Improve cleanup/scrub/upgradesstables failure handling (CASSANDRA-6774) +Merged from 2.0: + * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514) * Add support for DELETE ... IF EXISTS to CQL3 (CASSANDRA-5708) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1059828/src/java/org/apache/cassandra/service/StorageProxy.java --
[6/7] git commit: Merge remote-tracking branch 'origin/cassandra-2.1' into cassandra-2.1
Merge remote-tracking branch 'origin/cassandra-2.1' 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/05541ebc Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/05541ebc Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/05541ebc Branch: refs/heads/cassandra-2.1 Commit: 05541ebca3f91d84b685049660dcaad05bfb2790 Parents: e105982 a490d7e Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 01:02:49 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 01:02:49 2014 -0500 -- bin/cqlsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --
[4/7] git commit: merge from 2.0
merge from 2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e1059828 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e1059828 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e1059828 Branch: refs/heads/cassandra-2.1 Commit: e105982877ed32b69672d3431ee4ea57e1f93e4b Parents: 11a9618 f5e1cbc Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 00:15:45 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 00:15:45 2014 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/StorageProxy.java | 16 .../service/paxos/AbstractPaxosCallback.java| 6 -- .../cassandra/service/paxos/PrepareCallback.java| 5 +++-- .../cassandra/service/paxos/ProposeCallback.java| 5 +++-- 5 files changed, 19 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1059828/CHANGES.txt -- diff --cc CHANGES.txt index 9f66506,7eebd5b..81db5e2 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,29 -1,5 +1,30 @@@ -2.0.7 +2.1.0-beta2 + * Eliminate possibility of CL segment appearing twice in active list + (CASSANDRA-6557) + * Apply DONTNEED fadvise to commitlog segments (CASSANDRA-6759) + * Switch CRC component to Adler and include it for compressed sstables + (CASSANDRA-4165) + * Allow cassandra-stress to set compaction strategy options (CASSANDRA-6451) + * Add broadcast_rpc_address option to cassandra.yaml (CASSANDRA-5899) + * Auto reload GossipingPropertyFileSnitch config (CASSANDRA-5897) + * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573) + * Fix ABTC NPE and apply update function correctly (CASSANDRA-6692) + * Allow nodetool to use a file or prompt for password (CASSANDRA-6660) + * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742) + * Fix assertion error in ALTER TYPE RENAME (CASSANDRA-6705) + * Scrub should not always clear out repaired status (CASSANDRA-5351) + * Improve handling of range tombstone for wide partitions (CASSANDRA-6446) + * Fix ClassCastException for compact table with composites (CASSANDRA-6738) + * Fix potentially repairing with wrong nodes (CASSANDRA-6808) + * Change caching option syntax (CASSANDRA-6745) + * Fix stress to do proper counter reads (CASSANDRA-6835) + * Fix help message for stress counter_write (CASSANDRA-6824) + * Fix stress smart Thrift client to pick servers correctly (CASSANDRA-6848) + * Add logging levels (minimal, normal or verbose) to stress tool (CASSANDRA-6849) + * Fix race condition in Batch CLE (CASSANDRA-6860) + * Improve cleanup/scrub/upgradesstables failure handling (CASSANDRA-6774) +Merged from 2.0: + * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514) * Add support for DELETE ... IF EXISTS to CQL3 (CASSANDRA-5708) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1059828/src/java/org/apache/cassandra/service/StorageProxy.java --
[2/7] git commit: Include correct consistencyLevel in LWT timeout patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-6884
Include correct consistencyLevel in LWT timeout patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-6884 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f5e1cbca Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f5e1cbca Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f5e1cbca Branch: refs/heads/trunk Commit: f5e1cbca871e6e4cc7007177b2b0e9f367ae60ba Parents: 9269cb8 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 00:15:19 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 00:15:19 2014 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/StorageProxy.java | 16 .../service/paxos/AbstractPaxosCallback.java| 6 -- .../cassandra/service/paxos/PrepareCallback.java| 5 +++-- .../cassandra/service/paxos/ProposeCallback.java| 5 +++-- 5 files changed, 19 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5e1cbca/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 4741475..7eebd5b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.7 + * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514) * Add support for DELETE ... IF EXISTS to CQL3 (CASSANDRA-5708) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f5e1cbca/src/java/org/apache/cassandra/service/StorageProxy.java -- diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java index fda9819..a6912c2 100644 --- a/src/java/org/apache/cassandra/service/StorageProxy.java +++ b/src/java/org/apache/cassandra/service/StorageProxy.java @@ -246,7 +246,7 @@ public class StorageProxy implements StorageProxyMBean Commit proposal = Commit.newProposal(key, ballot, updates); Tracing.trace(CAS precondition is met; proposing client-requested updates for {}, ballot); -if (proposePaxos(proposal, liveEndpoints, requiredParticipants, true)) +if (proposePaxos(proposal, liveEndpoints, requiredParticipants, true, consistencyForPaxos)) { if (consistencyForCommit == ConsistencyLevel.ANY) sendCommit(proposal, liveEndpoints); @@ -318,7 +318,7 @@ public class StorageProxy implements StorageProxyMBean // prepare Tracing.trace(Preparing {}, ballot); Commit toPrepare = Commit.newPrepare(key, metadata, ballot); -summary = preparePaxos(toPrepare, liveEndpoints, requiredParticipants); +summary = preparePaxos(toPrepare, liveEndpoints, requiredParticipants, consistencyForPaxos); if (!summary.promised) { Tracing.trace(Some replicas have already promised a higher ballot than ours; aborting); @@ -336,7 +336,7 @@ public class StorageProxy implements StorageProxyMBean { Tracing.trace(Finishing incomplete paxos round {}, inProgress); Commit refreshedInProgress = Commit.newProposal(inProgress.key, ballot, inProgress.update); -if (proposePaxos(refreshedInProgress, liveEndpoints, requiredParticipants, false)) +if (proposePaxos(refreshedInProgress, liveEndpoints, requiredParticipants, false, consistencyForPaxos)) { commitPaxos(refreshedInProgress, ConsistencyLevel.QUORUM); } @@ -381,10 +381,10 @@ public class StorageProxy implements StorageProxyMBean MessagingService.instance().sendOneWay(message, target); } -private static PrepareCallback preparePaxos(Commit toPrepare, ListInetAddress endpoints, int requiredParticipants) +private static PrepareCallback preparePaxos(Commit toPrepare, ListInetAddress endpoints, int requiredParticipants, ConsistencyLevel consistencyForPaxos) throws WriteTimeoutException { -PrepareCallback callback = new PrepareCallback(toPrepare.key, toPrepare.update.metadata(), requiredParticipants); +PrepareCallback callback = new PrepareCallback(toPrepare.key, toPrepare.update.metadata(), requiredParticipants, consistencyForPaxos); MessageOutCommit message = new MessageOutCommit(MessagingService.Verb.PAXOS_PREPARE, toPrepare, Commit.serializer); for (InetAddress target : endpoints) MessagingService.instance().sendRR(message, target, callback); @@ -392,10 +392,10 @@ public class
[7/7] 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/f10de186 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f10de186 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f10de186 Branch: refs/heads/trunk Commit: f10de186326b78471efd454bb9d7fa44be515319 Parents: 3acba5b 05541eb Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 01:03:09 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 01:03:09 2014 -0500 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/StorageProxy.java | 16 .../service/paxos/AbstractPaxosCallback.java| 6 -- .../cassandra/service/paxos/PrepareCallback.java| 5 +++-- .../cassandra/service/paxos/ProposeCallback.java| 5 +++-- 5 files changed, 19 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f10de186/CHANGES.txt --
[6/6] 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/fd42aa3c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fd42aa3c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fd42aa3c Branch: refs/heads/trunk Commit: fd42aa3cf508fa1930184925cb714739500703b6 Parents: f10de18 a7a3282 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 01:05:13 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 01:05:13 2014 -0500 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/config/Schema.java | 4 2 files changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fd42aa3c/CHANGES.txt --
[5/6] git commit: merge from 2.0
merge from 2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a7a3282d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a7a3282d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a7a3282d Branch: refs/heads/cassandra-2.1 Commit: a7a3282da8fbdd0d3fb04df698b457337620a98b Parents: 05541eb 4ce44df Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 01:05:09 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 01:05:09 2014 -0500 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/config/Schema.java | 4 2 files changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a7a3282d/CHANGES.txt -- diff --cc CHANGES.txt index 81db5e2,650f12c..33111ea --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,29 -1,5 +1,30 @@@ -2.0.7 +2.1.0-beta2 + * Eliminate possibility of CL segment appearing twice in active list + (CASSANDRA-6557) + * Apply DONTNEED fadvise to commitlog segments (CASSANDRA-6759) + * Switch CRC component to Adler and include it for compressed sstables + (CASSANDRA-4165) + * Allow cassandra-stress to set compaction strategy options (CASSANDRA-6451) + * Add broadcast_rpc_address option to cassandra.yaml (CASSANDRA-5899) + * Auto reload GossipingPropertyFileSnitch config (CASSANDRA-5897) + * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573) + * Fix ABTC NPE and apply update function correctly (CASSANDRA-6692) + * Allow nodetool to use a file or prompt for password (CASSANDRA-6660) + * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742) + * Fix assertion error in ALTER TYPE RENAME (CASSANDRA-6705) + * Scrub should not always clear out repaired status (CASSANDRA-5351) + * Improve handling of range tombstone for wide partitions (CASSANDRA-6446) + * Fix ClassCastException for compact table with composites (CASSANDRA-6738) + * Fix potentially repairing with wrong nodes (CASSANDRA-6808) + * Change caching option syntax (CASSANDRA-6745) + * Fix stress to do proper counter reads (CASSANDRA-6835) + * Fix help message for stress counter_write (CASSANDRA-6824) + * Fix stress smart Thrift client to pick servers correctly (CASSANDRA-6848) + * Add logging levels (minimal, normal or verbose) to stress tool (CASSANDRA-6849) + * Fix race condition in Batch CLE (CASSANDRA-6860) + * Improve cleanup/scrub/upgradesstables failure handling (CASSANDRA-6774) +Merged from 2.0: + * Omit tombstones from schema digests (CASSANDRA-6862) * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514) http://git-wip-us.apache.org/repos/asf/cassandra/blob/a7a3282d/src/java/org/apache/cassandra/config/Schema.java --
[3/6] git commit: Omit tombstones from schema digests patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-6862
Omit tombstones from schema digests patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-6862 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4ce44df4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4ce44df4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4ce44df4 Branch: refs/heads/trunk Commit: 4ce44df4d346124013e322fdbb13993f7d0689ab Parents: f5e1cbc Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 01:04:47 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 01:04:47 2014 -0500 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/config/Schema.java | 4 2 files changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ce44df4/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 7eebd5b..650f12c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.7 + * Omit tombstones from schema digests (CASSANDRA-6862) * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ce44df4/src/java/org/apache/cassandra/config/Schema.java -- diff --git a/src/java/org/apache/cassandra/config/Schema.java b/src/java/org/apache/cassandra/config/Schema.java index 0907177..f0a49dc 100644 --- a/src/java/org/apache/cassandra/config/Schema.java +++ b/src/java/org/apache/cassandra/config/Schema.java @@ -387,6 +387,10 @@ public class Schema if (invalidSchemaRow(row) || ignoredSchemaRow(row)) continue; +// we want to digest only live columns +ColumnFamilyStore.removeDeletedColumnsOnly(row.cf, Integer.MAX_VALUE); +row.cf.purgeTombstones(Integer.MAX_VALUE); + row.cf.updateDigest(versionDigest); }
[4/6] git commit: merge from 2.0
merge from 2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a7a3282d Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a7a3282d Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a7a3282d Branch: refs/heads/trunk Commit: a7a3282da8fbdd0d3fb04df698b457337620a98b Parents: 05541eb 4ce44df Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 01:05:09 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 01:05:09 2014 -0500 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/config/Schema.java | 4 2 files changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a7a3282d/CHANGES.txt -- diff --cc CHANGES.txt index 81db5e2,650f12c..33111ea --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,29 -1,5 +1,30 @@@ -2.0.7 +2.1.0-beta2 + * Eliminate possibility of CL segment appearing twice in active list + (CASSANDRA-6557) + * Apply DONTNEED fadvise to commitlog segments (CASSANDRA-6759) + * Switch CRC component to Adler and include it for compressed sstables + (CASSANDRA-4165) + * Allow cassandra-stress to set compaction strategy options (CASSANDRA-6451) + * Add broadcast_rpc_address option to cassandra.yaml (CASSANDRA-5899) + * Auto reload GossipingPropertyFileSnitch config (CASSANDRA-5897) + * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573) + * Fix ABTC NPE and apply update function correctly (CASSANDRA-6692) + * Allow nodetool to use a file or prompt for password (CASSANDRA-6660) + * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742) + * Fix assertion error in ALTER TYPE RENAME (CASSANDRA-6705) + * Scrub should not always clear out repaired status (CASSANDRA-5351) + * Improve handling of range tombstone for wide partitions (CASSANDRA-6446) + * Fix ClassCastException for compact table with composites (CASSANDRA-6738) + * Fix potentially repairing with wrong nodes (CASSANDRA-6808) + * Change caching option syntax (CASSANDRA-6745) + * Fix stress to do proper counter reads (CASSANDRA-6835) + * Fix help message for stress counter_write (CASSANDRA-6824) + * Fix stress smart Thrift client to pick servers correctly (CASSANDRA-6848) + * Add logging levels (minimal, normal or verbose) to stress tool (CASSANDRA-6849) + * Fix race condition in Batch CLE (CASSANDRA-6860) + * Improve cleanup/scrub/upgradesstables failure handling (CASSANDRA-6774) +Merged from 2.0: + * Omit tombstones from schema digests (CASSANDRA-6862) * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514) http://git-wip-us.apache.org/repos/asf/cassandra/blob/a7a3282d/src/java/org/apache/cassandra/config/Schema.java --
[2/6] git commit: Omit tombstones from schema digests patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-6862
Omit tombstones from schema digests patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-6862 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4ce44df4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4ce44df4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4ce44df4 Branch: refs/heads/cassandra-2.1 Commit: 4ce44df4d346124013e322fdbb13993f7d0689ab Parents: f5e1cbc Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 01:04:47 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 01:04:47 2014 -0500 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/config/Schema.java | 4 2 files changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ce44df4/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 7eebd5b..650f12c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.7 + * Omit tombstones from schema digests (CASSANDRA-6862) * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ce44df4/src/java/org/apache/cassandra/config/Schema.java -- diff --git a/src/java/org/apache/cassandra/config/Schema.java b/src/java/org/apache/cassandra/config/Schema.java index 0907177..f0a49dc 100644 --- a/src/java/org/apache/cassandra/config/Schema.java +++ b/src/java/org/apache/cassandra/config/Schema.java @@ -387,6 +387,10 @@ public class Schema if (invalidSchemaRow(row) || ignoredSchemaRow(row)) continue; +// we want to digest only live columns +ColumnFamilyStore.removeDeletedColumnsOnly(row.cf, Integer.MAX_VALUE); +row.cf.purgeTombstones(Integer.MAX_VALUE); + row.cf.updateDigest(versionDigest); }
[1/6] git commit: Omit tombstones from schema digests patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-6862
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 f5e1cbca8 - 4ce44df4d refs/heads/cassandra-2.1 05541ebca - a7a3282da refs/heads/trunk f10de1863 - fd42aa3cf Omit tombstones from schema digests patch by Oleg Anastasyev; reviewed by jbellis for CASSANDRA-6862 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4ce44df4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4ce44df4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4ce44df4 Branch: refs/heads/cassandra-2.0 Commit: 4ce44df4d346124013e322fdbb13993f7d0689ab Parents: f5e1cbc Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 01:04:47 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 01:04:47 2014 -0500 -- CHANGES.txt | 1 + src/java/org/apache/cassandra/config/Schema.java | 4 2 files changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ce44df4/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 7eebd5b..650f12c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.7 + * Omit tombstones from schema digests (CASSANDRA-6862) * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514) http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ce44df4/src/java/org/apache/cassandra/config/Schema.java -- diff --git a/src/java/org/apache/cassandra/config/Schema.java b/src/java/org/apache/cassandra/config/Schema.java index 0907177..f0a49dc 100644 --- a/src/java/org/apache/cassandra/config/Schema.java +++ b/src/java/org/apache/cassandra/config/Schema.java @@ -387,6 +387,10 @@ public class Schema if (invalidSchemaRow(row) || ignoredSchemaRow(row)) continue; +// we want to digest only live columns +ColumnFamilyStore.removeDeletedColumnsOnly(row.cf, Integer.MAX_VALUE); +row.cf.purgeTombstones(Integer.MAX_VALUE); + row.cf.updateDigest(versionDigest); }
[jira] [Commented] (CASSANDRA-6862) Schema versions mismatch on large ring
[ https://issues.apache.org/jira/browse/CASSANDRA-6862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940217#comment-13940217 ] Jonathan Ellis commented on CASSANDRA-6862: --- committed, will follow up in 6863 Schema versions mismatch on large ring -- Key: CASSANDRA-6862 URL: https://issues.apache.org/jira/browse/CASSANDRA-6862 Project: Cassandra Issue Type: Bug Components: Core Environment: 2.0 Reporter: Oleg Anastasyev Assignee: Oleg Anastasyev Fix For: 2.0.7 Attachments: 6862-v2.txt, SchemaVersionLiveColumns.txt We have a large cluster with several hundreds nodes in 1 ring. Sometimes, especially after massive restarts, schema versions reported on different nodes mismatch. Investigated and found, that difference is not in schema itsself, but in thombstones (different nodes have different set of thombstones applied to system tables). Fixed by digesting schema with thombstones removed first. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6863) Incorrect read repair of range thombstones
[ https://issues.apache.org/jira/browse/CASSANDRA-6863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940219#comment-13940219 ] Jonathan Ellis commented on CASSANDRA-6863: --- Agreed. Incorrect read repair of range thombstones -- Key: CASSANDRA-6863 URL: https://issues.apache.org/jira/browse/CASSANDRA-6863 Project: Cassandra Issue Type: Bug Environment: 2.0 Reporter: Oleg Anastasyev Attachments: ReadRepairRangeThombstoneDiff.txt, ReadRepairsDebugLogger.txt Rows with range thombstones are read repaired for every replica, if RR is triggered (this is because CF.diff() returns non null if !isEmpty(), which in turn returns false if range thombstones list is not empty). Also, full rangethombstone list is send to all nodes, which could be a problem if you have wide partition. Fixed this by evaluating diff on range thombstone lists as well as on deteleInfo of endpoint CF versions. Also return null from CF.diff, if no diff in RTL. A second patch (ReadRepairsDebugLogger.txt) adds some debug logging to look at read repairs. You may find it useful as well. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6689) Partially Off Heap Memtables
[ https://issues.apache.org/jira/browse/CASSANDRA-6689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940231#comment-13940231 ] Pavel Yaskevich commented on CASSANDRA-6689: [~jbellis] I am, sorry, I got mixed up in something else but I'm going to look at it mid this week (tomorrow or thursday). Partially Off Heap Memtables Key: CASSANDRA-6689 URL: https://issues.apache.org/jira/browse/CASSANDRA-6689 Project: Cassandra Issue Type: New Feature Components: Core Reporter: Benedict Assignee: Benedict Fix For: 2.1 beta2 Attachments: CASSANDRA-6689-small-changes.patch Move the contents of ByteBuffers off-heap for records written to a memtable. (See comments for details) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6822) Never ending batch replay after dropping column family
[ https://issues.apache.org/jira/browse/CASSANDRA-6822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940287#comment-13940287 ] Duncan Sands commented on CASSANDRA-6822: - $ grep bc3916e0-a533-11e3-9c41-55f381b5 system.log* system.log.10: WARN [BatchlogTasks:1] 2014-03-07 17:32:44,430 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.10: WARN [BatchlogTasks:1] 2014-03-07 17:50:08,962 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.11: WARN [BatchlogTasks:1] 2014-03-07 17:16:01,702 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.12: WARN [BatchlogTasks:1] 2014-03-07 16:42:30,661 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.12: WARN [BatchlogTasks:1] 2014-03-07 16:59:16,837 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.13: WARN [BatchlogTasks:1] 2014-03-07 16:25:31,578 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.14: WARN [BatchlogTasks:1] 2014-03-07 15:51:00,713 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.14: WARN [BatchlogTasks:1] 2014-03-07 16:08:35,048 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.15: WARN [BatchlogTasks:1] 2014-03-07 15:34:07,253 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.16: WARN [BatchlogTasks:1] 2014-03-07 15:17:12,570 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.17: WARN [BatchlogTasks:1] 2014-03-07 14:43:43,369 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.17: WARN [BatchlogTasks:1] 2014-03-07 15:00:26,634 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.18: WARN [BatchlogTasks:1] 2014-03-07 14:26:15,338 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.19: WARN [BatchlogTasks:1] 2014-03-07 13:52:49,399 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.19: WARN [BatchlogTasks:1] 2014-03-07 14:09:32,664 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.20: WARN [BatchlogTasks:1] 2014-03-07 13:36:07,128 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find cfId=2fdad07d-0cc3-373a-8aa0-15837cd9bc6c system.log.21: WARN [BatchlogTasks:1] 2014-03-07 13:02:31,492 BatchlogManager.java (line 235) Skipped batch replay of bc3916e0-a533-11e3-9c41-55f381b5 due to org.apache.cassandra.db.UnknownColumnFamilyException: Couldn't find
[jira] [Commented] (CASSANDRA-6311) Add CqlRecordReader to take advantage of native CQL pagination
[ https://issues.apache.org/jira/browse/CASSANDRA-6311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940292#comment-13940292 ] Piotr Kołaczkowski commented on CASSANDRA-6311: --- +1 Add CqlRecordReader to take advantage of native CQL pagination -- Key: CASSANDRA-6311 URL: https://issues.apache.org/jira/browse/CASSANDRA-6311 Project: Cassandra Issue Type: New Feature Components: Hadoop Reporter: Alex Liu Assignee: Alex Liu Fix For: 2.0.7 Attachments: 6311-v3-2.0-branch.txt, 6311-v4.txt, 6311-v5-2.0-branch.txt, 6311-v6-2.0-branch.txt, 6311-v7.txt, 6311-v8.txt, 6311-v9.txt, 6331-2.0-branch.txt, 6331-v2-2.0-branch.txt Since the latest Cql pagination is done and it should be more efficient, so we need update CqlPagingRecordReader to use it instead of the custom thrift paging. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6816) CQL3 docs don't mention BATCH UNLOGGED
[ https://issues.apache.org/jira/browse/CASSANDRA-6816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940293#comment-13940293 ] Sylvain Lebresne commented on CASSANDRA-6816: - +1, though we could maybe add that the logged batch are only slower when multiple partition are involved (for completeness sake). CQL3 docs don't mention BATCH UNLOGGED -- Key: CASSANDRA-6816 URL: https://issues.apache.org/jira/browse/CASSANDRA-6816 Project: Cassandra Issue Type: Bug Components: Documentation website Reporter: Duncan Sands Assignee: Tyler Hobbs Priority: Minor Attachments: 6816.txt Here http://cassandra.apache.org/doc/cql3/CQL.html#batchStmt there is no mentioned of BATCH UNLOGGED or BATCH COUNTER. The datastax documentation has it: http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/batch_r.html -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6826) Query returns different number of results depending on fetchsize
[ https://issues.apache.org/jira/browse/CASSANDRA-6826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940294#comment-13940294 ] Sylvain Lebresne commented on CASSANDRA-6826: - If you can reproduce easily enough, some code that reproduce would truly be the best thing to help with this. Query returns different number of results depending on fetchsize Key: CASSANDRA-6826 URL: https://issues.apache.org/jira/browse/CASSANDRA-6826 Project: Cassandra Issue Type: Bug Components: Core Environment: quad-core Windows 7 x64, single node cluster Cassandra 2.0.5 Reporter: Bill Mitchell Assignee: Sylvain Lebresne I issue a query across the set of partitioned wide rows for one logical row, where s, l, and partition specify the composite primary key for the row: SELECT ec, ea, rd FROM sr WHERE s = ? and partition IN ? and l = ? ALLOW FILTERING; If I set fetchSize to only 1000 when the Cluster is configured, the query sometimes does not return all the results. In the particular case I am chasing, it returns a total of 98586 rows. If I increase the fetchsize to 10, all the 9 actual rows are returned. This suggests there is some problem with fetchsize re-establishing the position on the next segment of the result set, at least when multiple partitions are being accessed. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (CASSANDRA-6887) LOCAL_ONE read repair only does local repair, in spite of global digest queries
Duncan Sands created CASSANDRA-6887: --- Summary: LOCAL_ONE read repair only does local repair, in spite of global digest queries Key: CASSANDRA-6887 URL: https://issues.apache.org/jira/browse/CASSANDRA-6887 Project: Cassandra Issue Type: Bug Components: Core Environment: Cassandra 2.0.6, x86-64 ubuntu precise Reporter: Duncan Sands I have a cluster spanning two data centres. Almost all of the writing (and a lot of reading) is done in DC1. DC2 is used for running the occasional analytics query. Reads in both data centres use LOCAL_ONE. Read repair settings are set to the defaults on all column families. I had a long network outage between the data centres; it lasted longer than the hints window, so after it was over DC2 didn't have the latest information. Even after reading data many many times in DC2, the returned data was still out of date: read repair was not correcting it. I then investigated using cqlsh in DC2, with tracing on. What I saw was: - with consistency ONE, after about 10 read requests a digest request would be sent to many nodes (spanning both data centres), and the data in DC2 would be repaired. - with consistency LOCAL_ONE, after about 10 read requests a digest request would be sent to many nodes (spanning both data centres), but the data in DC2 would not be repaired. This is in spite of digest requests being sent to DC1, as shown by the tracing. So it looks like digest requests are being sent to both data centres, but replies from outside the local data centre are ignored when using LOCAL_ONE. The same data is being queried all the time in DC1 with consistency LOCAL_ONE, but this didn't result in the data in DC2 being read repaired either. This is a slightly different case to what I described above: in that case the local node was out of date and the remote node had the latest data, while here it is the other way round. It could be argued that you don't want cross data centre read repair when using LOCAL_ONE. But then why bother sending cross data centre digest requests? And if only doing local read repair is how it is supposed to work then it would be good to document this somewhere. -- This message was sent by Atlassian JIRA (v6.2#6252)
git commit: Static columns with IF NOT EXISTS don't always work as expected
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 4ce44df4d - f1f8384a0 Static columns with IF NOT EXISTS don't always work as expected patch by slebresne; reviewed by iamaleksey for CASSANDRA-6783 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f1f8384a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f1f8384a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f1f8384a Branch: refs/heads/cassandra-2.0 Commit: f1f8384a0c449e600b62280bbd601d6da08c3e74 Parents: 4ce44df Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Mar 19 10:55:19 2014 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Mar 19 10:55:19 2014 +0100 -- CHANGES.txt | 1 + .../cql3/statements/ModificationStatement.java | 39 2 files changed, 25 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1f8384a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 650f12c..2bb3605 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,7 @@ * Add paranoid disk failure option (CASSANDRA-6646) * Improve PerRowSecondaryIndex performance (CASSANDRA-6876) * Extend triggers to support CAS updates (CASSANDRA-6882) + * Static columns with IF NOT EXISTS don't always work as expected (CASSANDRA-6873) Merged from 1.2: * add extra SSL cipher suites (CASSANDRA-6613) * fix nodetool getsstables for blob PK (CASSANDRA-6803) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1f8384a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java -- diff --git a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java index d96ea9c..526a26c 100644 --- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java @@ -76,7 +76,9 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF private boolean ifExists; private boolean hasNoClusteringColumns = true; -private boolean setsOnlyStaticColumns; + +private boolean setsStaticColumns; +private boolean setsRegularColumns; private final FunctionColumnCondition, ColumnIdentifier getColumnForCondition = new FunctionColumnCondition, ColumnIdentifier() { @@ -178,14 +180,9 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF public void addOperation(Operation op) { if (op.isStatic(cfm)) -{ -if (columnOperations.isEmpty()) -setsOnlyStaticColumns = true; -} +setsStaticColumns = true; else -{ -setsOnlyStaticColumns = false; -} +setsRegularColumns = true; columnOperations.add(op); } @@ -208,12 +205,14 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF ListColumnCondition conds = null; if (cond.column.kind == CFDefinition.Name.Kind.STATIC) { +setsStaticColumns = true; if (staticConditions == null) staticConditions = new ArrayListColumnCondition(); conds = staticConditions; } else { +setsRegularColumns = true; if (columnConditions == null) columnConditions = new ArrayListColumnCondition(); conds = columnConditions; @@ -361,13 +360,23 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF // UPDATE t SET s = 3 WHERE k = 0 AND v = 1 // DELETE v FROM t WHERE k = 0 AND v = 1 // sounds like you don't really understand what your are doing. -if (setsOnlyStaticColumns columnConditions == null (type != StatementType.INSERT || hasNoClusteringColumns)) +if (setsStaticColumns !setsRegularColumns) { -// Reject if any clustering columns is set -for (CFDefinition.Name name : cfm.getCfDef().clusteringColumns()) -if (processedKeys.get(name.name) != null) -throw new InvalidRequestException(String.format(Invalid restriction on clustering column %s since the %s statement modifies only static columns, name.name, type)); -return cfm.getStaticColumnNameBuilder(); +// If we set no non-static columns, then it's fine not to have clustering columns +if (hasNoClusteringColumns) +return
[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 Conflicts: CHANGES.txt src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e23e57ff Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e23e57ff Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e23e57ff Branch: refs/heads/cassandra-2.1 Commit: e23e57fffe3573eae45f6ee54e400b837d6c6a14 Parents: a7a3282 f1f8384 Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Mar 19 11:05:51 2014 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Mar 19 11:05:51 2014 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/config/Schema.java | 4 +- .../cql3/statements/ModificationStatement.java | 39 3 files changed, 27 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e23e57ff/CHANGES.txt -- diff --cc CHANGES.txt index 33111ea,2bb3605..159d242 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -48,8 -22,10 +48,9 @@@ Merged from 2.0 * Add paranoid disk failure option (CASSANDRA-6646) * Improve PerRowSecondaryIndex performance (CASSANDRA-6876) * Extend triggers to support CAS updates (CASSANDRA-6882) - * Static columns with IF NOT EXISTS don't always work as expected (CASSANDRA-6873) -Merged from 1.2: * add extra SSL cipher suites (CASSANDRA-6613) * fix nodetool getsstables for blob PK (CASSANDRA-6803) ++ * Static columns with IF NOT EXISTS don't always work as expected (CASSANDRA-6873) 2.0.6 http://git-wip-us.apache.org/repos/asf/cassandra/blob/e23e57ff/src/java/org/apache/cassandra/config/Schema.java -- diff --cc src/java/org/apache/cassandra/config/Schema.java index c5c080f,f0a49dc..5c38a78 --- a/src/java/org/apache/cassandra/config/Schema.java +++ b/src/java/org/apache/cassandra/config/Schema.java @@@ -30,6 -31,7 +30,7 @@@ import org.slf4j.LoggerFactory import org.apache.cassandra.db.*; import org.apache.cassandra.db.Keyspace; -import org.apache.cassandra.db.marshal.AbstractType; ++import org.apache.cassandra.db.index.SecondaryIndexManager; import org.apache.cassandra.io.sstable.Descriptor; import org.apache.cassandra.service.MigrationManager; import org.apache.cassandra.utils.ConcurrentBiMap; @@@ -356,9 -388,9 +357,8 @@@ public class Schem continue; // we want to digest only live columns --ColumnFamilyStore.removeDeletedColumnsOnly(row.cf, Integer.MAX_VALUE); ++ColumnFamilyStore.removeDeletedColumnsOnly(row.cf, Integer.MAX_VALUE, SecondaryIndexManager.nullUpdater); row.cf.purgeTombstones(Integer.MAX_VALUE); -- row.cf.updateDigest(versionDigest); } http://git-wip-us.apache.org/repos/asf/cassandra/blob/e23e57ff/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java -- diff --cc src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java index eafdba5,526a26c..acc4802 --- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java @@@ -69,13 -76,15 +69,15 @@@ public abstract class ModificationState private boolean ifExists; private boolean hasNoClusteringColumns = true; - private boolean setsOnlyStaticColumns; + + private boolean setsStaticColumns; + private boolean setsRegularColumns; -private final FunctionColumnCondition, ColumnIdentifier getColumnForCondition = new FunctionColumnCondition, ColumnIdentifier() +private final FunctionColumnCondition, ColumnDefinition getColumnForCondition = new FunctionColumnCondition, ColumnDefinition() { -public ColumnIdentifier apply(ColumnCondition cond) +public ColumnDefinition apply(ColumnCondition cond) { -return cond.column.name; +return cond.column; } }; @@@ -158,15 -179,10 +160,10 @@@ public void addOperation(Operation op) { -if (op.isStatic(cfm)) +if (op.column.isStatic()) - { - if (columnOperations.isEmpty()) - setsOnlyStaticColumns = true; - } + setsStaticColumns = true; else - { - setsOnlyStaticColumns = false; - } + setsRegularColumns = true; columnOperations.add(op); } @@@ -187,8 -203,9 +184,9 @@@
[1/3] git commit: Static columns with IF NOT EXISTS don't always work as expected
Repository: cassandra Updated Branches: refs/heads/trunk fd42aa3cf - fcd791ae7 Static columns with IF NOT EXISTS don't always work as expected patch by slebresne; reviewed by iamaleksey for CASSANDRA-6783 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f1f8384a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f1f8384a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f1f8384a Branch: refs/heads/trunk Commit: f1f8384a0c449e600b62280bbd601d6da08c3e74 Parents: 4ce44df Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Mar 19 10:55:19 2014 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Mar 19 10:55:19 2014 +0100 -- CHANGES.txt | 1 + .../cql3/statements/ModificationStatement.java | 39 2 files changed, 25 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1f8384a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 650f12c..2bb3605 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,7 @@ * Add paranoid disk failure option (CASSANDRA-6646) * Improve PerRowSecondaryIndex performance (CASSANDRA-6876) * Extend triggers to support CAS updates (CASSANDRA-6882) + * Static columns with IF NOT EXISTS don't always work as expected (CASSANDRA-6873) Merged from 1.2: * add extra SSL cipher suites (CASSANDRA-6613) * fix nodetool getsstables for blob PK (CASSANDRA-6803) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1f8384a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java -- diff --git a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java index d96ea9c..526a26c 100644 --- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java @@ -76,7 +76,9 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF private boolean ifExists; private boolean hasNoClusteringColumns = true; -private boolean setsOnlyStaticColumns; + +private boolean setsStaticColumns; +private boolean setsRegularColumns; private final FunctionColumnCondition, ColumnIdentifier getColumnForCondition = new FunctionColumnCondition, ColumnIdentifier() { @@ -178,14 +180,9 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF public void addOperation(Operation op) { if (op.isStatic(cfm)) -{ -if (columnOperations.isEmpty()) -setsOnlyStaticColumns = true; -} +setsStaticColumns = true; else -{ -setsOnlyStaticColumns = false; -} +setsRegularColumns = true; columnOperations.add(op); } @@ -208,12 +205,14 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF ListColumnCondition conds = null; if (cond.column.kind == CFDefinition.Name.Kind.STATIC) { +setsStaticColumns = true; if (staticConditions == null) staticConditions = new ArrayListColumnCondition(); conds = staticConditions; } else { +setsRegularColumns = true; if (columnConditions == null) columnConditions = new ArrayListColumnCondition(); conds = columnConditions; @@ -361,13 +360,23 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF // UPDATE t SET s = 3 WHERE k = 0 AND v = 1 // DELETE v FROM t WHERE k = 0 AND v = 1 // sounds like you don't really understand what your are doing. -if (setsOnlyStaticColumns columnConditions == null (type != StatementType.INSERT || hasNoClusteringColumns)) +if (setsStaticColumns !setsRegularColumns) { -// Reject if any clustering columns is set -for (CFDefinition.Name name : cfm.getCfDef().clusteringColumns()) -if (processedKeys.get(name.name) != null) -throw new InvalidRequestException(String.format(Invalid restriction on clustering column %s since the %s statement modifies only static columns, name.name, type)); -return cfm.getStaticColumnNameBuilder(); +// If we set no non-static columns, then it's fine not to have clustering columns +if (hasNoClusteringColumns) +return cfm.getStaticColumnNameBuilder(); + +
[1/2] git commit: Static columns with IF NOT EXISTS don't always work as expected
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 a7a3282da - e23e57fff Static columns with IF NOT EXISTS don't always work as expected patch by slebresne; reviewed by iamaleksey for CASSANDRA-6783 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f1f8384a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f1f8384a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f1f8384a Branch: refs/heads/cassandra-2.1 Commit: f1f8384a0c449e600b62280bbd601d6da08c3e74 Parents: 4ce44df Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Mar 19 10:55:19 2014 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Mar 19 10:55:19 2014 +0100 -- CHANGES.txt | 1 + .../cql3/statements/ModificationStatement.java | 39 2 files changed, 25 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1f8384a/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 650f12c..2bb3605 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -22,6 +22,7 @@ * Add paranoid disk failure option (CASSANDRA-6646) * Improve PerRowSecondaryIndex performance (CASSANDRA-6876) * Extend triggers to support CAS updates (CASSANDRA-6882) + * Static columns with IF NOT EXISTS don't always work as expected (CASSANDRA-6873) Merged from 1.2: * add extra SSL cipher suites (CASSANDRA-6613) * fix nodetool getsstables for blob PK (CASSANDRA-6803) http://git-wip-us.apache.org/repos/asf/cassandra/blob/f1f8384a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java -- diff --git a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java index d96ea9c..526a26c 100644 --- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java @@ -76,7 +76,9 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF private boolean ifExists; private boolean hasNoClusteringColumns = true; -private boolean setsOnlyStaticColumns; + +private boolean setsStaticColumns; +private boolean setsRegularColumns; private final FunctionColumnCondition, ColumnIdentifier getColumnForCondition = new FunctionColumnCondition, ColumnIdentifier() { @@ -178,14 +180,9 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF public void addOperation(Operation op) { if (op.isStatic(cfm)) -{ -if (columnOperations.isEmpty()) -setsOnlyStaticColumns = true; -} +setsStaticColumns = true; else -{ -setsOnlyStaticColumns = false; -} +setsRegularColumns = true; columnOperations.add(op); } @@ -208,12 +205,14 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF ListColumnCondition conds = null; if (cond.column.kind == CFDefinition.Name.Kind.STATIC) { +setsStaticColumns = true; if (staticConditions == null) staticConditions = new ArrayListColumnCondition(); conds = staticConditions; } else { +setsRegularColumns = true; if (columnConditions == null) columnConditions = new ArrayListColumnCondition(); conds = columnConditions; @@ -361,13 +360,23 @@ public abstract class ModificationStatement implements CQLStatement, MeasurableF // UPDATE t SET s = 3 WHERE k = 0 AND v = 1 // DELETE v FROM t WHERE k = 0 AND v = 1 // sounds like you don't really understand what your are doing. -if (setsOnlyStaticColumns columnConditions == null (type != StatementType.INSERT || hasNoClusteringColumns)) +if (setsStaticColumns !setsRegularColumns) { -// Reject if any clustering columns is set -for (CFDefinition.Name name : cfm.getCfDef().clusteringColumns()) -if (processedKeys.get(name.name) != null) -throw new InvalidRequestException(String.format(Invalid restriction on clustering column %s since the %s statement modifies only static columns, name.name, type)); -return cfm.getStaticColumnNameBuilder(); +// If we set no non-static columns, then it's fine not to have clustering columns +if (hasNoClusteringColumns) +return
[2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 Conflicts: CHANGES.txt src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e23e57ff Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e23e57ff Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e23e57ff Branch: refs/heads/trunk Commit: e23e57fffe3573eae45f6ee54e400b837d6c6a14 Parents: a7a3282 f1f8384 Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Mar 19 11:05:51 2014 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Mar 19 11:05:51 2014 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/config/Schema.java | 4 +- .../cql3/statements/ModificationStatement.java | 39 3 files changed, 27 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e23e57ff/CHANGES.txt -- diff --cc CHANGES.txt index 33111ea,2bb3605..159d242 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -48,8 -22,10 +48,9 @@@ Merged from 2.0 * Add paranoid disk failure option (CASSANDRA-6646) * Improve PerRowSecondaryIndex performance (CASSANDRA-6876) * Extend triggers to support CAS updates (CASSANDRA-6882) - * Static columns with IF NOT EXISTS don't always work as expected (CASSANDRA-6873) -Merged from 1.2: * add extra SSL cipher suites (CASSANDRA-6613) * fix nodetool getsstables for blob PK (CASSANDRA-6803) ++ * Static columns with IF NOT EXISTS don't always work as expected (CASSANDRA-6873) 2.0.6 http://git-wip-us.apache.org/repos/asf/cassandra/blob/e23e57ff/src/java/org/apache/cassandra/config/Schema.java -- diff --cc src/java/org/apache/cassandra/config/Schema.java index c5c080f,f0a49dc..5c38a78 --- a/src/java/org/apache/cassandra/config/Schema.java +++ b/src/java/org/apache/cassandra/config/Schema.java @@@ -30,6 -31,7 +30,7 @@@ import org.slf4j.LoggerFactory import org.apache.cassandra.db.*; import org.apache.cassandra.db.Keyspace; -import org.apache.cassandra.db.marshal.AbstractType; ++import org.apache.cassandra.db.index.SecondaryIndexManager; import org.apache.cassandra.io.sstable.Descriptor; import org.apache.cassandra.service.MigrationManager; import org.apache.cassandra.utils.ConcurrentBiMap; @@@ -356,9 -388,9 +357,8 @@@ public class Schem continue; // we want to digest only live columns --ColumnFamilyStore.removeDeletedColumnsOnly(row.cf, Integer.MAX_VALUE); ++ColumnFamilyStore.removeDeletedColumnsOnly(row.cf, Integer.MAX_VALUE, SecondaryIndexManager.nullUpdater); row.cf.purgeTombstones(Integer.MAX_VALUE); -- row.cf.updateDigest(versionDigest); } http://git-wip-us.apache.org/repos/asf/cassandra/blob/e23e57ff/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java -- diff --cc src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java index eafdba5,526a26c..acc4802 --- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java @@@ -69,13 -76,15 +69,15 @@@ public abstract class ModificationState private boolean ifExists; private boolean hasNoClusteringColumns = true; - private boolean setsOnlyStaticColumns; + + private boolean setsStaticColumns; + private boolean setsRegularColumns; -private final FunctionColumnCondition, ColumnIdentifier getColumnForCondition = new FunctionColumnCondition, ColumnIdentifier() +private final FunctionColumnCondition, ColumnDefinition getColumnForCondition = new FunctionColumnCondition, ColumnDefinition() { -public ColumnIdentifier apply(ColumnCondition cond) +public ColumnDefinition apply(ColumnCondition cond) { -return cond.column.name; +return cond.column; } }; @@@ -158,15 -179,10 +160,10 @@@ public void addOperation(Operation op) { -if (op.isStatic(cfm)) +if (op.column.isStatic()) - { - if (columnOperations.isEmpty()) - setsOnlyStaticColumns = true; - } + setsStaticColumns = true; else - { - setsOnlyStaticColumns = false; - } + setsRegularColumns = true; columnOperations.add(op); } @@@ -187,8 -203,9 +184,9 @@@ public void
[3/3] 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/fcd791ae Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fcd791ae Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fcd791ae Branch: refs/heads/trunk Commit: fcd791ae7cc318999af6bc2773bffdff4ea6f584 Parents: fd42aa3 e23e57f Author: Sylvain Lebresne sylv...@datastax.com Authored: Wed Mar 19 11:06:10 2014 +0100 Committer: Sylvain Lebresne sylv...@datastax.com Committed: Wed Mar 19 11:06:10 2014 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/config/Schema.java | 4 +- .../cql3/statements/ModificationStatement.java | 39 3 files changed, 27 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/fcd791ae/CHANGES.txt --
[jira] [Commented] (CASSANDRA-6886) cassandra-stress currently uses thrift by default
[ https://issues.apache.org/jira/browse/CASSANDRA-6886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940361#comment-13940361 ] Benedict commented on CASSANDRA-6886: - bq. Well, JMeter can be used in non-GUI /command line mode as well Well, I think you have to deploy a pre-constructed test plan, that is not easily tweaked once deployed, which is why I said more easily :) cassandra-stress currently uses thrift by default - Key: CASSANDRA-6886 URL: https://issues.apache.org/jira/browse/CASSANDRA-6886 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Russ Hatch Priority: Minor Since thrift will be frozen, and cql3 native is the preferred alternative, can stress be updated to default to cql3 native? -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-6783) Collections should have a proper compare() method for UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-6783: Attachment: (was: 6783-2.txt) Collections should have a proper compare() method for UDT - Key: CASSANDRA-6783 URL: https://issues.apache.org/jira/browse/CASSANDRA-6783 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Fix For: 2.1 beta2 Attachments: 6783.txt So far, ListType, SetType and MapType don't have a proper implementation of compare() (they throw UnsupportedOperationException) because we haven't need one since as far as the cell comparator is concenred, only parts of a collection ends up in the comparator and need to be compared, but the full collection itself does not. But with UDT can nest a collection and that sometimes require to be able to compare them. Typically, I pushed a dtest [here|https://github.com/riptano/cassandra-dtest/commit/290e9496d1b2c45158c7d7f5487d09ba48897a7f] that ends up throwing: {noformat} java.lang.UnsupportedOperationException: CollectionType should not be use directly as a comparator at org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:72) ~[main/:na] at org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:37) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractType.compareCollectionMembers(AbstractType.java:174) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:101) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:35) ~[main/:na] at java.util.TreeMap.compare(TreeMap.java:1188) ~[na:1.7.0_45] at java.util.TreeMap.put(TreeMap.java:531) ~[na:1.7.0_45] at java.util.TreeSet.add(TreeSet.java:255) ~[na:1.7.0_45] at org.apache.cassandra.cql3.Sets$DelayedValue.bind(Sets.java:205) ~[main/:na] at org.apache.cassandra.cql3.Sets$Literal.prepare(Sets.java:91) ~[main/:na] at org.apache.cassandra.cql3.UserTypes$Literal.prepare(UserTypes.java:60) ~[main/:na] at org.apache.cassandra.cql3.Operation$SetElement.prepare(Operation.java:221) ~[main/:na] at org.apache.cassandra.cql3.statements.UpdateStatement$ParsedUpdate.prepareInternal(UpdateStatement.java:201) ~[main/:na] ... {noformat} Note that this stack doesn't involve cell name comparison at all, it's just that CQL3 sometimes uses a SortedSet underneath to deal with set literals (since internal sets are sorted by their value), and so when a set contains UDT that has set themselves, we need the collection comparison. That being said, for some cases like having a UDT as a map key, we do would need collections to be comparable for the purpose of cell name comparison. Attaching relatively simple patch. The patch is a bit bigger than it should be because while adding the 3 simple compare() method, I realized that we had methods to read a short length (2 unsigned short) from a ByteBuffer duplicated all over the place and that it was time to consolidate that in ByteBufferUtil where it should have been from day one (thus removing the duplication). I can separate that trivial refactor in a separate patch if we really need to, but really, the new stuff is the compare() method implementation in ListType, SetType and MapType and the rest is a bit of trivial cleanup. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-6783) Collections should have a proper compare() method for UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-6783: Attachment: 6783-2.txt Can't seem to get this one right, can I? Updated v2 to fix this. Collections should have a proper compare() method for UDT - Key: CASSANDRA-6783 URL: https://issues.apache.org/jira/browse/CASSANDRA-6783 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Fix For: 2.1 beta2 Attachments: 6783-2.txt, 6783.txt So far, ListType, SetType and MapType don't have a proper implementation of compare() (they throw UnsupportedOperationException) because we haven't need one since as far as the cell comparator is concenred, only parts of a collection ends up in the comparator and need to be compared, but the full collection itself does not. But with UDT can nest a collection and that sometimes require to be able to compare them. Typically, I pushed a dtest [here|https://github.com/riptano/cassandra-dtest/commit/290e9496d1b2c45158c7d7f5487d09ba48897a7f] that ends up throwing: {noformat} java.lang.UnsupportedOperationException: CollectionType should not be use directly as a comparator at org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:72) ~[main/:na] at org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:37) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractType.compareCollectionMembers(AbstractType.java:174) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:101) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:35) ~[main/:na] at java.util.TreeMap.compare(TreeMap.java:1188) ~[na:1.7.0_45] at java.util.TreeMap.put(TreeMap.java:531) ~[na:1.7.0_45] at java.util.TreeSet.add(TreeSet.java:255) ~[na:1.7.0_45] at org.apache.cassandra.cql3.Sets$DelayedValue.bind(Sets.java:205) ~[main/:na] at org.apache.cassandra.cql3.Sets$Literal.prepare(Sets.java:91) ~[main/:na] at org.apache.cassandra.cql3.UserTypes$Literal.prepare(UserTypes.java:60) ~[main/:na] at org.apache.cassandra.cql3.Operation$SetElement.prepare(Operation.java:221) ~[main/:na] at org.apache.cassandra.cql3.statements.UpdateStatement$ParsedUpdate.prepareInternal(UpdateStatement.java:201) ~[main/:na] ... {noformat} Note that this stack doesn't involve cell name comparison at all, it's just that CQL3 sometimes uses a SortedSet underneath to deal with set literals (since internal sets are sorted by their value), and so when a set contains UDT that has set themselves, we need the collection comparison. That being said, for some cases like having a UDT as a map key, we do would need collections to be comparable for the purpose of cell name comparison. Attaching relatively simple patch. The patch is a bit bigger than it should be because while adding the 3 simple compare() method, I realized that we had methods to read a short length (2 unsigned short) from a ByteBuffer duplicated all over the place and that it was time to consolidate that in ByteBufferUtil where it should have been from day one (thus removing the duplication). I can separate that trivial refactor in a separate patch if we really need to, but really, the new stuff is the compare() method implementation in ListType, SetType and MapType and the rest is a bit of trivial cleanup. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6311) Add CqlRecordReader to take advantage of native CQL pagination
[ https://issues.apache.org/jira/browse/CASSANDRA-6311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940367#comment-13940367 ] Sylvain Lebresne commented on CASSANDRA-6311: - Tried to commit this but v9 doesn't seem to apply cleanly on the current cassandra-2.0 branch (unless that's meant to be 2.1 only but that's not what the 'fix version' says so...). As a side node, we should update the driver dependency to 2.0.1 instead of 2.0.0-rc2. Add CqlRecordReader to take advantage of native CQL pagination -- Key: CASSANDRA-6311 URL: https://issues.apache.org/jira/browse/CASSANDRA-6311 Project: Cassandra Issue Type: New Feature Components: Hadoop Reporter: Alex Liu Assignee: Alex Liu Fix For: 2.0.7 Attachments: 6311-v3-2.0-branch.txt, 6311-v4.txt, 6311-v5-2.0-branch.txt, 6311-v6-2.0-branch.txt, 6311-v7.txt, 6311-v8.txt, 6311-v9.txt, 6331-2.0-branch.txt, 6331-v2-2.0-branch.txt Since the latest Cql pagination is done and it should be more efficient, so we need update CqlPagingRecordReader to use it instead of the custom thrift paging. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6837) Batch CAS does not support LOCAL_SERIAL
[ https://issues.apache.org/jira/browse/CASSANDRA-6837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940383#comment-13940383 ] Sylvain Lebresne commented on CASSANDRA-6837: - At the risk of sounding obtuse, we use serial_consistency both in thrift and in the native protocol spec. And truth is, while maybe not perfect, I do think it's better than paxos_consistency because that would be leaking implementation details and we've always said that the use of Paxos was an implementation detail we didn't wanted to leak. It also happen that I don't really see the problem with serial_consistency. The comment in cassandra.thrift describe it this way {quote} The first one, serial_consistency_level, simply indicates the level of serialization required. This can be either ConsistencyLevel.SERIAL or ConsistencyLevel.LOCAL_SERIAL {quote} and to me that sounds relatively sensible. Of course, we can call it serial consistency externally but paxos consistency internally, but that feels a bit inconsistent for no good reason. Anyway, all this to say that imo serial_consistency is better than paxos_consistency at least externally because it doesn't leak implementation details, and that it follows to me that there is no point in making it different internally. Nor do I think that serial_consistency is so bad that we should bother finding something else. Those arguments and opinion being made, if you still think it's worth renaming, I won't fight it, and feel free to go ahead. It's orthogonal to this issue however, the patch here didn't introduced the serial_consistency naming. Batch CAS does not support LOCAL_SERIAL --- Key: CASSANDRA-6837 URL: https://issues.apache.org/jira/browse/CASSANDRA-6837 Project: Cassandra Issue Type: Bug Components: Core Reporter: Nicolas Favre-Felix Assignee: Sylvain Lebresne Fix For: 2.0.7 Attachments: 6837.txt The batch CAS feature introduced in Cassandra 2.0.6 does not support the LOCAL_SERIAL consistency level, and always uses SERIAL. Create a cluster with 4 nodes with the following topology: {code} Datacenter: DC2 === Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- AddressLoad Tokens Owns Host ID Rack UN 127.0.0.3 269 KB 256 26.3% ae92d997-6042-42d9-b447-943080569742 RAC1 UN 127.0.0.4 197.81 KB 256 25.1% 3edc92d7-9d1b-472a-8452-24dddbc4502c RAC1 Datacenter: DC1 === Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- AddressLoad Tokens Owns Host ID Rack UN 127.0.0.1 226.92 KB 256 24.8% dbc17bd7-1ede-47a2-9b31-6063752d6eb3 RAC1 UN 127.0.0.2 179.27 KB 256 23.7% bb0ad285-34d2-4989-a664-b068986ab6fa RAC1 {code} In cqlsh: {code} cqlsh CREATE KEYSPACE foo WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': 2, 'DC2': 2}; cqlsh USE foo; cqlsh:foo CREATE TABLE bar (x text, y bigint, z bigint, t bigint, PRIMARY KEY(x,y)); {code} Kill nodes 127.0.0.3 and 127.0.0.4: {code} Datacenter: DC2 === Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- AddressLoad Tokens Owns Host ID Rack DN 127.0.0.3 262.37 KB 256 26.3% ae92d997-6042-42d9-b447-943080569742 RAC1 DN 127.0.0.4 208.04 KB 256 25.1% 3edc92d7-9d1b-472a-8452-24dddbc4502c RAC1 Datacenter: DC1 === Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- AddressLoad Tokens Owns Host ID Rack UN 127.0.0.1 214.82 KB 256 24.8% dbc17bd7-1ede-47a2-9b31-6063752d6eb3 RAC1 UN 127.0.0.2 178.23 KB 256 23.7% bb0ad285-34d2-4989-a664-b068986ab6fa RAC1 {code} Connect to 127.0.0.1 in DC1 and run a CAS batch at CL.LOCAL_SERIAL+LOCAL_QUORUM: {code} final Cluster cluster = new Cluster.Builder() .addContactPoint(127.0.0.1) .withLoadBalancingPolicy(new DCAwareRoundRobinPolicy(DC1)) .build(); final Session session = cluster.connect(foo); Batch batch = QueryBuilder.batch(); batch.add(new SimpleStatement(INSERT INTO bar (x,y,z) VALUES ('abc', 123, 1) IF NOT EXISTS)); batch.add(new SimpleStatement(UPDATE bar SET t=2 WHERE x='abc' AND y=123)); batch.setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM); batch.setSerialConsistencyLevel(ConsistencyLevel.LOCAL_SERIAL); session.execute(batch); {code} The batch fails with: {code} Caused by: com.datastax.driver.core.exceptions.UnavailableException: Not enough replica available for query at consistency SERIAL (3 required but only 2 alive) at
[jira] [Commented] (CASSANDRA-6883) stress read fails with IOException Data returned was not validated
[ https://issues.apache.org/jira/browse/CASSANDRA-6883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940392#comment-13940392 ] Benedict commented on CASSANDRA-6883: - Yes: Looks like I was using inclusive bounds to construct the apache UniformRealDistribution, when its upper bound is exclusive. The reason it failed, however, is because the writer writes a random prefix of columns, whereas the reader reads a random subset of columns, for reasons I won't go into - this can be changed, but for now is probably not worth the effort. Attaching simply patch stress read fails with IOException Data returned was not validated Key: CASSANDRA-6883 URL: https://issues.apache.org/jira/browse/CASSANDRA-6883 Project: Cassandra Issue Type: Bug Components: Tools Environment: ccm 3 node cluster, java 1.7.0_51 cassandra 2.1 branch -- 615612f61566 Reporter: Russ Hatch I'm working to do some basic testing of read/write with the new stress. First, I populate data using write like so: {noformat} rhatch@whatup:~/git/cstar/cassandra$ tools/bin/cassandra-stress write n=100 CL=ONE -key dist=FIXED\(1\) -col n=UNIFORM\(1..100\) -schema replication\(factor=3\) -rate threads=50 {noformat} Then I attempt a read test, and this happens: {noformat} rhatch@whatup:~/git/cstar/cassandra$ tools/bin/cassandra-stress read n=100 CL=ONE -key dist=FIXED\(1\) -col n=UNIFORM\(1..100\) -schema replication\(factor=3\) -rate threads=50 Warming up READ with 5 iterations... INFO 19:38:14 New Cassandra host /127.0.0.3 added INFO 19:38:14 New Cassandra host /127.0.0.2 added Connected to cluster: test_stress Datatacenter: datacenter1; Host: localhost/127.0.0.1; Rack: rack1 Datatacenter: datacenter1; Host: /127.0.0.2; Rack: rack1 Datatacenter: datacenter1; Host: /127.0.0.3; Rack: rack1 java.io.IOException: Operation [11055] x0 key 01 (0x30303030303030303031) Data returned was not validated at org.apache.cassandra.stress.Operation.error(Operation.java:298) at org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:276) at org.apache.cassandra.stress.operations.ThriftReader.run(ThriftReader.java:46) at org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:304) Sleeping 2s... Running READ with 50 threads for 100 iterations ops ,op/s,adj op/s, key/s,mean, med, .95, .99, .999, max, time, stderr 11287 , 11286, 11286, 11286, 4.7, 3.8,11.9,21.8, 34.0,52.9,1.0, 0.0 23263 , 11764, 11764, 11764, 4.3, 3.5,10.4,18.1, 29.8,51.8,2.0, 0.0 35300 , 11889, 11889, 11889, 4.2, 3.7, 9.6,15.3, 27.3,40.0,3.0, 0.01467 47239 , 11737, 11737, 11737, 4.3, 3.7,10.1,17.0, 26.9,47.7,4.0, 0.01289 59140 , 11729, 11729, 11729, 4.3, 3.8, 9.6,15.1, 25.7,47.9,5.1, 0.00979 java.io.IOException: Operation [66434] x0 key 01 (0x30303030303030303031) Data returned was not validated at org.apache.cassandra.stress.Operation.error(Operation.java:298) at org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:276) at org.apache.cassandra.stress.operations.ThriftReader.run(ThriftReader.java:46) at org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:304) 66584 , 11952, 11952, 11952, 4.2, 3.6, 9.9,15.7, 24.7,64.9,5.7, 0.00788 FAILURE {noformat} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-6883) stress read fails with IOException Data returned was not validated
[ https://issues.apache.org/jira/browse/CASSANDRA-6883?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedict updated CASSANDRA-6883: Attachment: 6883.txt stress read fails with IOException Data returned was not validated Key: CASSANDRA-6883 URL: https://issues.apache.org/jira/browse/CASSANDRA-6883 Project: Cassandra Issue Type: Bug Components: Tools Environment: ccm 3 node cluster, java 1.7.0_51 cassandra 2.1 branch -- 615612f61566 Reporter: Russ Hatch Fix For: 2.1 beta2 Attachments: 6883.txt I'm working to do some basic testing of read/write with the new stress. First, I populate data using write like so: {noformat} rhatch@whatup:~/git/cstar/cassandra$ tools/bin/cassandra-stress write n=100 CL=ONE -key dist=FIXED\(1\) -col n=UNIFORM\(1..100\) -schema replication\(factor=3\) -rate threads=50 {noformat} Then I attempt a read test, and this happens: {noformat} rhatch@whatup:~/git/cstar/cassandra$ tools/bin/cassandra-stress read n=100 CL=ONE -key dist=FIXED\(1\) -col n=UNIFORM\(1..100\) -schema replication\(factor=3\) -rate threads=50 Warming up READ with 5 iterations... INFO 19:38:14 New Cassandra host /127.0.0.3 added INFO 19:38:14 New Cassandra host /127.0.0.2 added Connected to cluster: test_stress Datatacenter: datacenter1; Host: localhost/127.0.0.1; Rack: rack1 Datatacenter: datacenter1; Host: /127.0.0.2; Rack: rack1 Datatacenter: datacenter1; Host: /127.0.0.3; Rack: rack1 java.io.IOException: Operation [11055] x0 key 01 (0x30303030303030303031) Data returned was not validated at org.apache.cassandra.stress.Operation.error(Operation.java:298) at org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:276) at org.apache.cassandra.stress.operations.ThriftReader.run(ThriftReader.java:46) at org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:304) Sleeping 2s... Running READ with 50 threads for 100 iterations ops ,op/s,adj op/s, key/s,mean, med, .95, .99, .999, max, time, stderr 11287 , 11286, 11286, 11286, 4.7, 3.8,11.9,21.8, 34.0,52.9,1.0, 0.0 23263 , 11764, 11764, 11764, 4.3, 3.5,10.4,18.1, 29.8,51.8,2.0, 0.0 35300 , 11889, 11889, 11889, 4.2, 3.7, 9.6,15.3, 27.3,40.0,3.0, 0.01467 47239 , 11737, 11737, 11737, 4.3, 3.7,10.1,17.0, 26.9,47.7,4.0, 0.01289 59140 , 11729, 11729, 11729, 4.3, 3.8, 9.6,15.1, 25.7,47.9,5.1, 0.00979 java.io.IOException: Operation [66434] x0 key 01 (0x30303030303030303031) Data returned was not validated at org.apache.cassandra.stress.Operation.error(Operation.java:298) at org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:276) at org.apache.cassandra.stress.operations.ThriftReader.run(ThriftReader.java:46) at org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:304) 66584 , 11952, 11952, 11952, 4.2, 3.6, 9.9,15.7, 24.7,64.9,5.7, 0.00788 FAILURE {noformat} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6870) Transform operation
[ https://issues.apache.org/jira/browse/CASSANDRA-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940425#comment-13940425 ] Edward Capriolo commented on CASSANDRA-6870: I am going to add one more feature. We can support nested functions by creating temporary columns Concat a,b - c Trim c - d All we need to do is add a bol to the transform that states if we wish to keep the column at the end of the transform. Transform operation --- Key: CASSANDRA-6870 URL: https://issues.apache.org/jira/browse/CASSANDRA-6870 Project: Cassandra Issue Type: New Feature Reporter: Edward Capriolo Assignee: Edward Capriolo Priority: Minor Compare and swap uses paxos to only update a value only if some criteria is met. If I understand correctly we should be able to use this feature to provide a wider variety of server side operations. For example inside a paxos transaction performing a slice and then using a function to manipulate the slice. You could accomplish features like append and increment this way without user needing to know the current value. I took a stab at doing this. I **think** I did it correctly. Comments welcome. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6837) Batch CAS does not support LOCAL_SERIAL
[ https://issues.apache.org/jira/browse/CASSANDRA-6837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940435#comment-13940435 ] Jonathan Ellis commented on CASSANDRA-6837: --- fair enough Batch CAS does not support LOCAL_SERIAL --- Key: CASSANDRA-6837 URL: https://issues.apache.org/jira/browse/CASSANDRA-6837 Project: Cassandra Issue Type: Bug Components: Core Reporter: Nicolas Favre-Felix Assignee: Sylvain Lebresne Fix For: 2.0.7 Attachments: 6837.txt The batch CAS feature introduced in Cassandra 2.0.6 does not support the LOCAL_SERIAL consistency level, and always uses SERIAL. Create a cluster with 4 nodes with the following topology: {code} Datacenter: DC2 === Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- AddressLoad Tokens Owns Host ID Rack UN 127.0.0.3 269 KB 256 26.3% ae92d997-6042-42d9-b447-943080569742 RAC1 UN 127.0.0.4 197.81 KB 256 25.1% 3edc92d7-9d1b-472a-8452-24dddbc4502c RAC1 Datacenter: DC1 === Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- AddressLoad Tokens Owns Host ID Rack UN 127.0.0.1 226.92 KB 256 24.8% dbc17bd7-1ede-47a2-9b31-6063752d6eb3 RAC1 UN 127.0.0.2 179.27 KB 256 23.7% bb0ad285-34d2-4989-a664-b068986ab6fa RAC1 {code} In cqlsh: {code} cqlsh CREATE KEYSPACE foo WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': 2, 'DC2': 2}; cqlsh USE foo; cqlsh:foo CREATE TABLE bar (x text, y bigint, z bigint, t bigint, PRIMARY KEY(x,y)); {code} Kill nodes 127.0.0.3 and 127.0.0.4: {code} Datacenter: DC2 === Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- AddressLoad Tokens Owns Host ID Rack DN 127.0.0.3 262.37 KB 256 26.3% ae92d997-6042-42d9-b447-943080569742 RAC1 DN 127.0.0.4 208.04 KB 256 25.1% 3edc92d7-9d1b-472a-8452-24dddbc4502c RAC1 Datacenter: DC1 === Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- AddressLoad Tokens Owns Host ID Rack UN 127.0.0.1 214.82 KB 256 24.8% dbc17bd7-1ede-47a2-9b31-6063752d6eb3 RAC1 UN 127.0.0.2 178.23 KB 256 23.7% bb0ad285-34d2-4989-a664-b068986ab6fa RAC1 {code} Connect to 127.0.0.1 in DC1 and run a CAS batch at CL.LOCAL_SERIAL+LOCAL_QUORUM: {code} final Cluster cluster = new Cluster.Builder() .addContactPoint(127.0.0.1) .withLoadBalancingPolicy(new DCAwareRoundRobinPolicy(DC1)) .build(); final Session session = cluster.connect(foo); Batch batch = QueryBuilder.batch(); batch.add(new SimpleStatement(INSERT INTO bar (x,y,z) VALUES ('abc', 123, 1) IF NOT EXISTS)); batch.add(new SimpleStatement(UPDATE bar SET t=2 WHERE x='abc' AND y=123)); batch.setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM); batch.setSerialConsistencyLevel(ConsistencyLevel.LOCAL_SERIAL); session.execute(batch); {code} The batch fails with: {code} Caused by: com.datastax.driver.core.exceptions.UnavailableException: Not enough replica available for query at consistency SERIAL (3 required but only 2 alive) at com.datastax.driver.core.Responses$Error$1.decode(Responses.java:44) at com.datastax.driver.core.Responses$Error$1.decode(Responses.java:33) at com.datastax.driver.core.Message$ProtocolDecoder.decode(Message.java:182) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:66) ... 21 more {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6733) Upgrade of 1.2.11 to 2.0.5 make IllegalArgumentException in Buffer.limit on read of a super column family
[ https://issues.apache.org/jira/browse/CASSANDRA-6733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940437#comment-13940437 ] Nicolas Lalevée commented on CASSANDRA-6733: I tried again the upgrade but with 2.0.6 on our test cluster, it was not straight forward (I'll ask for some insights on cassandra-user), but it was successful. Upgrade of 1.2.11 to 2.0.5 make IllegalArgumentException in Buffer.limit on read of a super column family - Key: CASSANDRA-6733 URL: https://issues.apache.org/jira/browse/CASSANDRA-6733 Project: Cassandra Issue Type: Bug Reporter: Nicolas Lalevée Assignee: Sylvain Lebresne Fix For: 2.0.6 Attachments: 6733.txt, QaUser_user_view_node1.tgz, QaUser_user_view_node2.tgz We have a super column family which was first created with a 1.0.x. Then upgraded to 1.1.x, then to 1.2.11, and now to 2.0.5. {noformat} cqlsh:QaUser desc table user_view; CREATE TABLE user_view ( key bigint, column1 varint, column2 text, value counter, PRIMARY KEY (key, column1, column2) ) WITH COMPACT STORAGE AND bloom_filter_fp_chance=0.01 AND caching='KEYS_ONLY' AND comment='' AND dclocal_read_repair_chance=0.00 AND gc_grace_seconds=864000 AND index_interval=128 AND read_repair_chance=1.00 AND replicate_on_write='true' AND populate_io_cache_on_flush='false' AND default_time_to_live=0 AND speculative_retry='99.0PERCENTILE' AND memtable_flush_period_in_ms=0 AND compaction={'class': 'SizeTieredCompactionStrategy'} AND compression={'sstable_compression': 'SnappyCompressor'}; {noformat} With cqlsh, the following query was doing a timeout: {noformat} select * from user_view where key = 3 and column1 = 1 and column2 = '20130218'; {noformat} In the log of cassandra, we could read: {noformat} ERROR [ReadStage:1385] 2014-02-19 14:45:19,549 CassandraDaemon.java (line 192) Exception in thread Thread[ReadStage:1385,5,main] java.lang.IllegalArgumentException at java.nio.Buffer.limit(Buffer.java:267) at org.apache.cassandra.db.marshal.AbstractCompositeType.getBytes(AbstractCompositeType.java:55) at org.apache.cassandra.db.marshal.AbstractCompositeType.getWithShortLength(AbstractCompositeType.java:64) at org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:82) at org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:35) at org.apache.cassandra.db.marshal.AbstractType$1.compare(AbstractType.java:63) at org.apache.cassandra.db.marshal.AbstractType$1.compare(AbstractType.java:60) at java.util.Collections.indexedBinarySearch(Collections.java:377) at java.util.Collections.binarySearch(Collections.java:365) at org.apache.cassandra.io.sstable.IndexHelper.indexFor(IndexHelper.java:144) at org.apache.cassandra.db.columniterator.IndexedSliceReader$IndexedBlockFetcher.setNextSlice(IndexedSliceReader.java:262) at org.apache.cassandra.db.columniterator.IndexedSliceReader$IndexedBlockFetcher.init(IndexedSliceReader.java:255) at org.apache.cassandra.db.columniterator.IndexedSliceReader.init(IndexedSliceReader.java:91) at org.apache.cassandra.db.columniterator.SSTableSliceIterator.createReader(SSTableSliceIterator.java:65) at org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:42) at org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:167) at org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:62) at org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:250) at org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:53) at org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1560) at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1379) at org.apache.cassandra.db.Keyspace.getRow(Keyspace.java:327) at org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:65) at org.apache.cassandra.db.ReadVerbHandler.doVerb(ReadVerbHandler.java:47) at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:60) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) {noformat}
[jira] [Commented] (CASSANDRA-6781) ByteBuffer write() methods for serializing sstables
[ https://issues.apache.org/jira/browse/CASSANDRA-6781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940459#comment-13940459 ] Marcus Eriksson commented on CASSANDRA-6781: this looks good to me, rebased, squashed and pushed; https://github.com/krummas/cassandra/commits/bes/6781 - with a small commit on top, mostly removing unused imports and files ByteBuffer write() methods for serializing sstables --- Key: CASSANDRA-6781 URL: https://issues.apache.org/jira/browse/CASSANDRA-6781 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Benedict Priority: Minor Fix For: 2.1 beta2 As mentioned in CASSANDRA-6689, there may be some performance issues with writing sstables from offheap memtables. This is mostly plausibly caused by the single-byte-at-a-time write path for ByteBuffers, as we use DataOutput which only accepts byte[]. I propose extending DataOutput to include ByteBuffer methods, and to use this extended interface for serializing sstables instead. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6781) ByteBuffer write() methods for serializing sstables
[ https://issues.apache.org/jira/browse/CASSANDRA-6781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940475#comment-13940475 ] Benedict commented on CASSANDRA-6781: - +1. Changes look good. I should really setup Intellij to do that tidying up for me :-| ByteBuffer write() methods for serializing sstables --- Key: CASSANDRA-6781 URL: https://issues.apache.org/jira/browse/CASSANDRA-6781 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Benedict Priority: Minor Fix For: 2.1 beta2 As mentioned in CASSANDRA-6689, there may be some performance issues with writing sstables from offheap memtables. This is mostly plausibly caused by the single-byte-at-a-time write path for ByteBuffers, as we use DataOutput which only accepts byte[]. I propose extending DataOutput to include ByteBuffer methods, and to use this extended interface for serializing sstables instead. -- This message was sent by Atlassian JIRA (v6.2#6252)
[02/10] git commit: Extend limits.conf in debian packaging.
Extend limits.conf in debian packaging. Patch by brandonwilliams for CASSANDRA-6104 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/30085323 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/30085323 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/30085323 Branch: refs/heads/cassandra-2.0 Commit: 3008532322c3d23058b87d1bc0f30aac637e6308 Parents: 3876eef Author: Brandon Williams brandonwilli...@apache.org Authored: Wed Mar 19 08:59:33 2014 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Wed Mar 19 08:59:33 2014 -0500 -- debian/cassandra.conf | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/30085323/debian/cassandra.conf -- diff --git a/debian/cassandra.conf b/debian/cassandra.conf index 987ba6e..72ede9e 100644 --- a/debian/cassandra.conf +++ b/debian/cassandra.conf @@ -1,3 +1,5 @@ # Provided by the cassandra package cassandra - memlock unlimited cassandra - nofile 10 +cassandra - as unlimited +cassandra - nproc8096
[01/10] git commit: Extend limits.conf in debian packaging.
Repository: cassandra Updated Branches: refs/heads/cassandra-1.2 3876eefd1 - 300853232 refs/heads/cassandra-2.0 f1f8384a0 - 91e4d2288 refs/heads/cassandra-2.1 e23e57fff - 0ccee7f58 refs/heads/trunk fcd791ae7 - 51e41a7fb Extend limits.conf in debian packaging. Patch by brandonwilliams for CASSANDRA-6104 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/30085323 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/30085323 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/30085323 Branch: refs/heads/cassandra-1.2 Commit: 3008532322c3d23058b87d1bc0f30aac637e6308 Parents: 3876eef Author: Brandon Williams brandonwilli...@apache.org Authored: Wed Mar 19 08:59:33 2014 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Wed Mar 19 08:59:33 2014 -0500 -- debian/cassandra.conf | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/30085323/debian/cassandra.conf -- diff --git a/debian/cassandra.conf b/debian/cassandra.conf index 987ba6e..72ede9e 100644 --- a/debian/cassandra.conf +++ b/debian/cassandra.conf @@ -1,3 +1,5 @@ # Provided by the cassandra package cassandra - memlock unlimited cassandra - nofile 10 +cassandra - as unlimited +cassandra - nproc8096
[08/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.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/0ccee7f5 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0ccee7f5 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0ccee7f5 Branch: refs/heads/cassandra-2.1 Commit: 0ccee7f58cfbccd2f73aca847a32024eb25a338d Parents: e23e57f 91e4d22 Author: Brandon Williams brandonwilli...@apache.org Authored: Wed Mar 19 09:01:05 2014 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Wed Mar 19 09:01:05 2014 -0500 -- debian/cassandra.conf | 2 ++ 1 file changed, 2 insertions(+) --
[03/10] git commit: Extend limits.conf in debian packaging.
Extend limits.conf in debian packaging. Patch by brandonwilliams for CASSANDRA-6104 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/30085323 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/30085323 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/30085323 Branch: refs/heads/cassandra-2.1 Commit: 3008532322c3d23058b87d1bc0f30aac637e6308 Parents: 3876eef Author: Brandon Williams brandonwilli...@apache.org Authored: Wed Mar 19 08:59:33 2014 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Wed Mar 19 08:59:33 2014 -0500 -- debian/cassandra.conf | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/30085323/debian/cassandra.conf -- diff --git a/debian/cassandra.conf b/debian/cassandra.conf index 987ba6e..72ede9e 100644 --- a/debian/cassandra.conf +++ b/debian/cassandra.conf @@ -1,3 +1,5 @@ # Provided by the cassandra package cassandra - memlock unlimited cassandra - nofile 10 +cassandra - as unlimited +cassandra - nproc8096
[09/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.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/0ccee7f5 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0ccee7f5 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0ccee7f5 Branch: refs/heads/trunk Commit: 0ccee7f58cfbccd2f73aca847a32024eb25a338d Parents: e23e57f 91e4d22 Author: Brandon Williams brandonwilli...@apache.org Authored: Wed Mar 19 09:01:05 2014 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Wed Mar 19 09:01:05 2014 -0500 -- debian/cassandra.conf | 2 ++ 1 file changed, 2 insertions(+) --
[06/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/91e4d228 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/91e4d228 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/91e4d228 Branch: refs/heads/cassandra-2.0 Commit: 91e4d22880b341882149013f5f4c1da6227481fc Parents: f1f8384 3008532 Author: Brandon Williams brandonwilli...@apache.org Authored: Wed Mar 19 09:00:51 2014 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Wed Mar 19 09:00:51 2014 -0500 -- debian/cassandra.conf | 2 ++ 1 file changed, 2 insertions(+) --
[05/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/91e4d228 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/91e4d228 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/91e4d228 Branch: refs/heads/cassandra-2.1 Commit: 91e4d22880b341882149013f5f4c1da6227481fc Parents: f1f8384 3008532 Author: Brandon Williams brandonwilli...@apache.org Authored: Wed Mar 19 09:00:51 2014 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Wed Mar 19 09:00:51 2014 -0500 -- debian/cassandra.conf | 2 ++ 1 file changed, 2 insertions(+) --
[04/10] git commit: Extend limits.conf in debian packaging.
Extend limits.conf in debian packaging. Patch by brandonwilliams for CASSANDRA-6104 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/30085323 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/30085323 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/30085323 Branch: refs/heads/trunk Commit: 3008532322c3d23058b87d1bc0f30aac637e6308 Parents: 3876eef Author: Brandon Williams brandonwilli...@apache.org Authored: Wed Mar 19 08:59:33 2014 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Wed Mar 19 08:59:33 2014 -0500 -- debian/cassandra.conf | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/30085323/debian/cassandra.conf -- diff --git a/debian/cassandra.conf b/debian/cassandra.conf index 987ba6e..72ede9e 100644 --- a/debian/cassandra.conf +++ b/debian/cassandra.conf @@ -1,3 +1,5 @@ # Provided by the cassandra package cassandra - memlock unlimited cassandra - nofile 10 +cassandra - as unlimited +cassandra - nproc8096
[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/51e41a7f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/51e41a7f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/51e41a7f Branch: refs/heads/trunk Commit: 51e41a7fbd7b5f740e3f4a73e485323012e99619 Parents: fcd791a 0ccee7f Author: Brandon Williams brandonwilli...@apache.org Authored: Wed Mar 19 09:01:17 2014 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Wed Mar 19 09:01:17 2014 -0500 -- debian/cassandra.conf | 2 ++ 1 file changed, 2 insertions(+) --
[07/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/91e4d228 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/91e4d228 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/91e4d228 Branch: refs/heads/trunk Commit: 91e4d22880b341882149013f5f4c1da6227481fc Parents: f1f8384 3008532 Author: Brandon Williams brandonwilli...@apache.org Authored: Wed Mar 19 09:00:51 2014 -0500 Committer: Brandon Williams brandonwilli...@apache.org Committed: Wed Mar 19 09:00:51 2014 -0500 -- debian/cassandra.conf | 2 ++ 1 file changed, 2 insertions(+) --
[jira] [Resolved] (CASSANDRA-6104) Add additional limits in cassandra.conf provided by Debian package
[ https://issues.apache.org/jira/browse/CASSANDRA-6104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams resolved CASSANDRA-6104. - Resolution: Fixed Fix Version/s: 2.1 beta2 2.0.7 1.2.16 Committed the address space change as unlimited, and nproc at the reasonable bound of 8096, since going beyond that would suggest that either you need HSHA, or mask a bug on our side. Add additional limits in cassandra.conf provided by Debian package -- Key: CASSANDRA-6104 URL: https://issues.apache.org/jira/browse/CASSANDRA-6104 Project: Cassandra Issue Type: Bug Components: Packaging Reporter: J.B. Langston Assignee: Brandon Williams Priority: Trivial Fix For: 1.2.16, 2.0.7, 2.1 beta2 /etc/security/limits.d/cassandra.conf distributed with DSC deb/rpm packages should contain additional settings. We have found these limits to be necessary for some customers through various support tickets. {code} cassandra - memlock unlimited cassandra - nofile 10 cassandra - nproc 32768 cassandra - as unlimited {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (CASSANDRA-6888) Store whether a counter sstable still use some local/remote shards in the sstable metadata
Sylvain Lebresne created CASSANDRA-6888: --- Summary: Store whether a counter sstable still use some local/remote shards in the sstable metadata Key: CASSANDRA-6888 URL: https://issues.apache.org/jira/browse/CASSANDRA-6888 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Fix For: 2.1 CASSANDRA-6504 has made so we don't distinguish different type of shard in counters. Yet, even though we don't generate those local/remote type of shards, those won't disappear just by running upgradesstable, they need to be compacted away (and even then, they really only disappear if there has been a new update on the counter post-6504). But we want to get rid of those ultimately, since they make things like CASSANDRA-6506 less optimal. Now, even though the final step of that remain to be discussed, the first step is probably to keep track of whether such shard still exist in the system or not. That part is simple, we can just store a boolean in the SSTableMetadata to say whether or not said sstable still has at least one Cell using such old shard type. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-6689) Partially Off Heap Memtables
[ https://issues.apache.org/jira/browse/CASSANDRA-6689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ryan McGuire updated CASSANDRA-6689: Labels: performance (was: ) Partially Off Heap Memtables Key: CASSANDRA-6689 URL: https://issues.apache.org/jira/browse/CASSANDRA-6689 Project: Cassandra Issue Type: New Feature Components: Core Reporter: Benedict Assignee: Benedict Labels: performance Fix For: 2.1 beta2 Attachments: CASSANDRA-6689-small-changes.patch Move the contents of ByteBuffers off-heap for records written to a memtable. (See comments for details) -- This message was sent by Atlassian JIRA (v6.2#6252)
[5/6] git commit: merge from 2.0
merge from 2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a45fea8f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a45fea8f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a45fea8f Branch: refs/heads/cassandra-2.1 Commit: a45fea8fc67f770556a915b80ef6bea0c62ae3ee Parents: 0ccee7f 32c15c2 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 11:38:54 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 11:38:54 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile| 4 ++ .../cassandra/cql3/functions/Functions.java | 1 + .../cassandra/cql3/functions/UuidFcts.java | 42 4 files changed, 48 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/CHANGES.txt -- diff --cc CHANGES.txt index 159d242,41ec1d7..75f4cee --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,29 -1,5 +1,30 @@@ -2.0.7 +2.1.0-beta2 + * Eliminate possibility of CL segment appearing twice in active list + (CASSANDRA-6557) + * Apply DONTNEED fadvise to commitlog segments (CASSANDRA-6759) + * Switch CRC component to Adler and include it for compressed sstables + (CASSANDRA-4165) + * Allow cassandra-stress to set compaction strategy options (CASSANDRA-6451) + * Add broadcast_rpc_address option to cassandra.yaml (CASSANDRA-5899) + * Auto reload GossipingPropertyFileSnitch config (CASSANDRA-5897) + * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573) + * Fix ABTC NPE and apply update function correctly (CASSANDRA-6692) + * Allow nodetool to use a file or prompt for password (CASSANDRA-6660) + * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742) + * Fix assertion error in ALTER TYPE RENAME (CASSANDRA-6705) + * Scrub should not always clear out repaired status (CASSANDRA-5351) + * Improve handling of range tombstone for wide partitions (CASSANDRA-6446) + * Fix ClassCastException for compact table with composites (CASSANDRA-6738) + * Fix potentially repairing with wrong nodes (CASSANDRA-6808) + * Change caching option syntax (CASSANDRA-6745) + * Fix stress to do proper counter reads (CASSANDRA-6835) + * Fix help message for stress counter_write (CASSANDRA-6824) + * Fix stress smart Thrift client to pick servers correctly (CASSANDRA-6848) + * Add logging levels (minimal, normal or verbose) to stress tool (CASSANDRA-6849) + * Fix race condition in Batch CLE (CASSANDRA-6860) + * Improve cleanup/scrub/upgradesstables failure handling (CASSANDRA-6774) +Merged from 2.0: + * Add uuid() function (CASSANDRA-6473) * Omit tombstones from schema digests (CASSANDRA-6862) * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/doc/cql3/CQL.textile -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/src/java/org/apache/cassandra/cql3/functions/Functions.java --
[1/6] git commit: Add uuid() function patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 91e4d2288 - 32c15c2fb refs/heads/cassandra-2.1 0ccee7f58 - a45fea8fc refs/heads/trunk 51e41a7fb - 96b55cecc Add uuid() function patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/32c15c2f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/32c15c2f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/32c15c2f Branch: refs/heads/cassandra-2.0 Commit: 32c15c2fb0d31a8f061a8fb812c2d4851d52ef2f Parents: 91e4d22 Author: Carl Yeksigian c...@yeksigian.com Authored: Sat Mar 15 20:11:46 2014 -0400 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 11:38:26 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile| 4 ++ .../cassandra/cql3/functions/Functions.java | 1 + .../cassandra/cql3/functions/UuidFcts.java | 42 4 files changed, 48 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2bb3605..41ec1d7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.7 + * Add uuid() function (CASSANDRA-6473) * Omit tombstones from schema digests (CASSANDRA-6862) * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index 566d13c..b323f20 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -1007,6 +1007,10 @@ CREATE TABLE users ( then the @token@ function will take a single argument of type @text@ (in that case, the partition key is @userid@ (there is no clustering columns so the partition key is the same than the primary key)), and the return type will be @bigint@. +h3(#uuidFun). Uuid + +The @uuid@ function takes no parameters and generates a random type 4 uuid suitable for use in INSERT or SET statements. + h3(#timeuuidFun). Timeuuid functions h4. @now@ http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/Functions.java -- diff --git a/src/java/org/apache/cassandra/cql3/functions/Functions.java b/src/java/org/apache/cassandra/cql3/functions/Functions.java index 97a0e91..5f4201d 100644 --- a/src/java/org/apache/cassandra/cql3/functions/Functions.java +++ b/src/java/org/apache/cassandra/cql3/functions/Functions.java @@ -44,6 +44,7 @@ public abstract class Functions declared.put(maxtimeuuid, AbstractFunction.factory(TimeuuidFcts.maxTimeuuidFct)); declared.put(dateof, AbstractFunction.factory(TimeuuidFcts.dateOfFct)); declared.put(unixtimestampof, AbstractFunction.factory(TimeuuidFcts.unixTimestampOfFct)); +declared.put(uuid, AbstractFunction.factory(UuidFcts.uuidFct)); for (CQL3Type type : CQL3Type.Native.values()) { http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java -- diff --git a/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java new file mode 100644 index 000..718bcbc --- /dev/null +++ b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.cassandra.cql3.functions; + +import java.nio.ByteBuffer; +import java.util.List; +import java.util.UUID; + +import org.apache.cassandra.db.marshal.UUIDType; +import
[1/2] git commit: Add UNLOGGED, COUNTER options to BATCH docs
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 32c15c2fb - c80f61b68 Add UNLOGGED, COUNTER options to BATCH docs patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-6816 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7e870018 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7e870018 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7e870018 Branch: refs/heads/cassandra-2.0 Commit: 7e870018dc2b1b78cf1754056c260c77379d5b47 Parents: 3008532 Author: Tyler Hobbs ty...@datastax.com Authored: Wed Mar 19 11:37:09 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Mar 19 11:37:09 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile | 19 +++ 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index f88345d..960b0e9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2.16 + * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816) * add extra SSL cipher suites (CASSANDRA-6613) * fix nodetool getsstables for blob PK (CASSANDRA-6803) * Add CMSClassUnloadingEnabled JVM option (CASSANDRA-6541) http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index ecd3b7e..91e2625 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -536,7 +536,7 @@ h3(#batchStmt). BATCH __Syntax:__ bc(syntax).. -batch-stmt ::= BEGIN BATCH +batch-stmt ::= BEGIN ( UNLOGGED | COUNTER ) BATCH ( USING option ( AND option )* )? modification-stmt ( ';' modification-stmt )* APPLY BATCH @@ -557,11 +557,22 @@ BEGIN BATCH DELETE name FROM users WHERE userid = 'user1'; APPLY BATCH; -The @BATCH@ statement group multiple modification statements (insertions/updates and deletions) into a single statement. It mainly serves two purposes: -# it saves network round-trips between the client and the server (and sometimes between the server coordinator and the replicas) when batching multiple updates. -# all updates in a @BATCH@ belonging to a given partition key are performed atomically and in isolation +The @BATCH@ statement group multiple modification statements (insertions/updates and deletions) into a single statement. It serves several purposes: +# It saves network round-trips between the client and the server (and sometimes between the server coordinator and the replicas) when batching multiple updates. +# All updates in a @BATCH@ belonging to a given partition key are performed in isolation. +# By default, all operations in the batch are performed atomically. See the notes on @UNLOGGED@:#unloggedBatch for more details. Note however that the @BATCH@ statement only allows @UPDATE@, @INSERT@ and @DELETE@ statements and is _not_ a full analogue for SQL transactions. +h4(#unloggedBatch). @UNLOGGED@ + +By default, Cassandra uses a batch log to ensure all operations in a batch are applied atomically. (Note that the operations are still only isolated within a single partition.) + +There is a performance penalty for batch atomicity when a batch spans multiple partitions. If you do not want to incur this penalty, you can tell Cassandra to skip the batchlog with the @UNLOGGED@ option. If the @UNLOGGED@ option is used, operations are only atomic within a single partition. + +h4(#counterBatch). @COUNTER@ + +Use the @COUNTER@ option for batched counter updates. Unlike other updates in Cassandra, counter updates are not idempotent. + h4(#batchOptions). @option@ @BATCH@ supports both the @TIMESTAMP@ option, with similar semantic to the one described in the @UPDATE@:#updateOptions statement (the timestamp applies to all the statement inside the batch). However, if used, @TIMESTAMP@ *must not* be used in the statements within the batch.
[1/3] git commit: Add UNLOGGED, COUNTER options to BATCH docs
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 a45fea8fc - 2a2141ce6 Add UNLOGGED, COUNTER options to BATCH docs patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-6816 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7e870018 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7e870018 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7e870018 Branch: refs/heads/cassandra-2.1 Commit: 7e870018dc2b1b78cf1754056c260c77379d5b47 Parents: 3008532 Author: Tyler Hobbs ty...@datastax.com Authored: Wed Mar 19 11:37:09 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Mar 19 11:37:09 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile | 19 +++ 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index f88345d..960b0e9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2.16 + * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816) * add extra SSL cipher suites (CASSANDRA-6613) * fix nodetool getsstables for blob PK (CASSANDRA-6803) * Add CMSClassUnloadingEnabled JVM option (CASSANDRA-6541) http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index ecd3b7e..91e2625 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -536,7 +536,7 @@ h3(#batchStmt). BATCH __Syntax:__ bc(syntax).. -batch-stmt ::= BEGIN BATCH +batch-stmt ::= BEGIN ( UNLOGGED | COUNTER ) BATCH ( USING option ( AND option )* )? modification-stmt ( ';' modification-stmt )* APPLY BATCH @@ -557,11 +557,22 @@ BEGIN BATCH DELETE name FROM users WHERE userid = 'user1'; APPLY BATCH; -The @BATCH@ statement group multiple modification statements (insertions/updates and deletions) into a single statement. It mainly serves two purposes: -# it saves network round-trips between the client and the server (and sometimes between the server coordinator and the replicas) when batching multiple updates. -# all updates in a @BATCH@ belonging to a given partition key are performed atomically and in isolation +The @BATCH@ statement group multiple modification statements (insertions/updates and deletions) into a single statement. It serves several purposes: +# It saves network round-trips between the client and the server (and sometimes between the server coordinator and the replicas) when batching multiple updates. +# All updates in a @BATCH@ belonging to a given partition key are performed in isolation. +# By default, all operations in the batch are performed atomically. See the notes on @UNLOGGED@:#unloggedBatch for more details. Note however that the @BATCH@ statement only allows @UPDATE@, @INSERT@ and @DELETE@ statements and is _not_ a full analogue for SQL transactions. +h4(#unloggedBatch). @UNLOGGED@ + +By default, Cassandra uses a batch log to ensure all operations in a batch are applied atomically. (Note that the operations are still only isolated within a single partition.) + +There is a performance penalty for batch atomicity when a batch spans multiple partitions. If you do not want to incur this penalty, you can tell Cassandra to skip the batchlog with the @UNLOGGED@ option. If the @UNLOGGED@ option is used, operations are only atomic within a single partition. + +h4(#counterBatch). @COUNTER@ + +Use the @COUNTER@ option for batched counter updates. Unlike other updates in Cassandra, counter updates are not idempotent. + h4(#batchOptions). @option@ @BATCH@ supports both the @TIMESTAMP@ option, with similar semantic to the one described in the @UPDATE@:#updateOptions statement (the timestamp applies to all the statement inside the batch). However, if used, @TIMESTAMP@ *must not* be used in the statements within the batch.
[2/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.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/c80f61b6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c80f61b6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c80f61b6 Branch: refs/heads/cassandra-2.1 Commit: c80f61b682e4528b5d6f58b2ec0260138799da53 Parents: 32c15c2 7e87001 Author: Tyler Hobbs ty...@datastax.com Authored: Wed Mar 19 11:40:40 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Mar 19 11:40:40 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile | 19 +++ 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c80f61b6/CHANGES.txt -- diff --cc CHANGES.txt index 41ec1d7,960b0e9..f3f16e8 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,76 -1,11 +1,77 @@@ -1.2.16 +2.0.7 + * Add uuid() function (CASSANDRA-6473) + * Omit tombstones from schema digests (CASSANDRA-6862) + * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) + * Lower chances for losing new SSTables during nodetool refresh and + ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514) + * Add support for DELETE ... IF EXISTS to CQL3 (CASSANDRA-5708) + * Update hadoop_cql3_word_count example (CASSANDRA-6793) + * Fix handling of RejectedExecution in sync Thrift server (CASSANDRA-6788) + * Log more information when exceeding tombstone_warn_threshold (CASSANDRA-6865) + * Fix truncate to not abort due to unreachable fat clients (CASSANDRA-6864) + * Fix schema concurrency exceptions (CASSANDRA-6841) + * Fix leaking validator FH in StreamWriter (CASSANDRA-6832) + * Fix saving triggers to schema (CASSANDRA-6789) + * Fix trigger mutations when base mutation list is immutable (CASSANDRA-6790) + * Fix accounting in FileCacheService to allow re-using RAR (CASSANDRA-6838) + * Fix static counter columns (CASSANDRA-6827) + * Restore expiring-deleted (cell) compaction optimization (CASSANDRA-6844) + * Fix CompactionManager.needsCleanup (CASSANDRA-6845) + * Correctly compare BooleanType values other than 0 and 1 (CASSANDRA-6779) + * Read message id as string from earlier versions (CASSANDRA-6840) + * Properly use the Paxos consistency for (non-protocol) batch (CASSANDRA-6837) + * Add paranoid disk failure option (CASSANDRA-6646) + * Improve PerRowSecondaryIndex performance (CASSANDRA-6876) + * Extend triggers to support CAS updates (CASSANDRA-6882) + * Static columns with IF NOT EXISTS don't always work as expected (CASSANDRA-6873) +Merged from 1.2: + * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816) * add extra SSL cipher suites (CASSANDRA-6613) * fix nodetool getsstables for blob PK (CASSANDRA-6803) + + +2.0.6 + * Avoid race-prone second scrub of system keyspace (CASSANDRA-6797) + * Pool CqlRecordWriter clients by inetaddress rather than Range + (CASSANDRA-6665) + * Fix compaction_history timestamps (CASSANDRA-6784) + * Compare scores of full replica ordering in DES (CASSANDRA-6883) + * fix CME in SessionInfo updateProgress affecting netstats (CASSANDRA-6577) + * Allow repairing between specific replicas (CASSANDRA-6440) + * Allow per-dc enabling of hints (CASSANDRA-6157) + * Add compatibility for Hadoop 0.2.x (CASSANDRA-5201) + * Fix EstimatedHistogram races (CASSANDRA-6682) + * Failure detector correctly converts initial value to nanos (CASSANDRA-6658) + * Add nodetool taketoken to relocate vnodes (CASSANDRA-4445) + * Fix upgradesstables NPE for non-CF-based indexes (CASSANDRA-6645) + * Improve nodetool cfhistograms formatting (CASSANDRA-6360) + * Expose bulk loading progress over JMX (CASSANDRA-4757) + * Correctly handle null with IF conditions and TTL (CASSANDRA-6623) + * Account for range/row tombstones in tombstone drop + time histogram (CASSANDRA-6522) + * Stop CommitLogSegment.close() from calling sync() (CASSANDRA-6652) + * Make commitlog failure handling configurable (CASSANDRA-6364) + * Avoid overlaps in LCS (CASSANDRA-6688) + * Improve support for paginating over composites (CASSANDRA-4851) + * Fix count(*) queries in a mixed cluster (CASSANDRA-6707) + * Improve repair tasks(snapshot, differencing) concurrency (CASSANDRA-6566) + * Fix replaying pre-2.0 commit logs (CASSANDRA-6714) + * Add static columns to CQL3 (CASSANDRA-6561) + * Optimize single partition batch statements (CASSANDRA-6737) + * Disallow post-query re-ordering when paging (CASSANDRA-6722) + * Fix potential paging bug with deleted columns (CASSANDRA-6748) + * Fix NPE on BulkLoader caused by losing StreamEvent (CASSANDRA-6636) + * Fix truncating compression metadata (CASSANDRA-6791) + *
[3/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 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/2a2141ce Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2a2141ce Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2a2141ce Branch: refs/heads/cassandra-2.1 Commit: 2a2141ce6505187347613d50e854a6c13af01ceb Parents: a45fea8 c80f61b Author: Tyler Hobbs ty...@datastax.com Authored: Wed Mar 19 11:42:45 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Mar 19 11:42:45 2014 -0500 -- CHANGES.txt | 4 +++- doc/cql3/CQL.textile | 19 +++ 2 files changed, 18 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a2141ce/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a2141ce/doc/cql3/CQL.textile --
[2/4] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.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/c80f61b6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c80f61b6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c80f61b6 Branch: refs/heads/trunk Commit: c80f61b682e4528b5d6f58b2ec0260138799da53 Parents: 32c15c2 7e87001 Author: Tyler Hobbs ty...@datastax.com Authored: Wed Mar 19 11:40:40 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Mar 19 11:40:40 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile | 19 +++ 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c80f61b6/CHANGES.txt -- diff --cc CHANGES.txt index 41ec1d7,960b0e9..f3f16e8 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,76 -1,11 +1,77 @@@ -1.2.16 +2.0.7 + * Add uuid() function (CASSANDRA-6473) + * Omit tombstones from schema digests (CASSANDRA-6862) + * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) + * Lower chances for losing new SSTables during nodetool refresh and + ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514) + * Add support for DELETE ... IF EXISTS to CQL3 (CASSANDRA-5708) + * Update hadoop_cql3_word_count example (CASSANDRA-6793) + * Fix handling of RejectedExecution in sync Thrift server (CASSANDRA-6788) + * Log more information when exceeding tombstone_warn_threshold (CASSANDRA-6865) + * Fix truncate to not abort due to unreachable fat clients (CASSANDRA-6864) + * Fix schema concurrency exceptions (CASSANDRA-6841) + * Fix leaking validator FH in StreamWriter (CASSANDRA-6832) + * Fix saving triggers to schema (CASSANDRA-6789) + * Fix trigger mutations when base mutation list is immutable (CASSANDRA-6790) + * Fix accounting in FileCacheService to allow re-using RAR (CASSANDRA-6838) + * Fix static counter columns (CASSANDRA-6827) + * Restore expiring-deleted (cell) compaction optimization (CASSANDRA-6844) + * Fix CompactionManager.needsCleanup (CASSANDRA-6845) + * Correctly compare BooleanType values other than 0 and 1 (CASSANDRA-6779) + * Read message id as string from earlier versions (CASSANDRA-6840) + * Properly use the Paxos consistency for (non-protocol) batch (CASSANDRA-6837) + * Add paranoid disk failure option (CASSANDRA-6646) + * Improve PerRowSecondaryIndex performance (CASSANDRA-6876) + * Extend triggers to support CAS updates (CASSANDRA-6882) + * Static columns with IF NOT EXISTS don't always work as expected (CASSANDRA-6873) +Merged from 1.2: + * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816) * add extra SSL cipher suites (CASSANDRA-6613) * fix nodetool getsstables for blob PK (CASSANDRA-6803) + + +2.0.6 + * Avoid race-prone second scrub of system keyspace (CASSANDRA-6797) + * Pool CqlRecordWriter clients by inetaddress rather than Range + (CASSANDRA-6665) + * Fix compaction_history timestamps (CASSANDRA-6784) + * Compare scores of full replica ordering in DES (CASSANDRA-6883) + * fix CME in SessionInfo updateProgress affecting netstats (CASSANDRA-6577) + * Allow repairing between specific replicas (CASSANDRA-6440) + * Allow per-dc enabling of hints (CASSANDRA-6157) + * Add compatibility for Hadoop 0.2.x (CASSANDRA-5201) + * Fix EstimatedHistogram races (CASSANDRA-6682) + * Failure detector correctly converts initial value to nanos (CASSANDRA-6658) + * Add nodetool taketoken to relocate vnodes (CASSANDRA-4445) + * Fix upgradesstables NPE for non-CF-based indexes (CASSANDRA-6645) + * Improve nodetool cfhistograms formatting (CASSANDRA-6360) + * Expose bulk loading progress over JMX (CASSANDRA-4757) + * Correctly handle null with IF conditions and TTL (CASSANDRA-6623) + * Account for range/row tombstones in tombstone drop + time histogram (CASSANDRA-6522) + * Stop CommitLogSegment.close() from calling sync() (CASSANDRA-6652) + * Make commitlog failure handling configurable (CASSANDRA-6364) + * Avoid overlaps in LCS (CASSANDRA-6688) + * Improve support for paginating over composites (CASSANDRA-4851) + * Fix count(*) queries in a mixed cluster (CASSANDRA-6707) + * Improve repair tasks(snapshot, differencing) concurrency (CASSANDRA-6566) + * Fix replaying pre-2.0 commit logs (CASSANDRA-6714) + * Add static columns to CQL3 (CASSANDRA-6561) + * Optimize single partition batch statements (CASSANDRA-6737) + * Disallow post-query re-ordering when paging (CASSANDRA-6722) + * Fix potential paging bug with deleted columns (CASSANDRA-6748) + * Fix NPE on BulkLoader caused by losing StreamEvent (CASSANDRA-6636) + * Fix truncating compression metadata (CASSANDRA-6791) + * Fix
[3/4] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 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/2a2141ce Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2a2141ce Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2a2141ce Branch: refs/heads/trunk Commit: 2a2141ce6505187347613d50e854a6c13af01ceb Parents: a45fea8 c80f61b Author: Tyler Hobbs ty...@datastax.com Authored: Wed Mar 19 11:42:45 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Mar 19 11:42:45 2014 -0500 -- CHANGES.txt | 4 +++- doc/cql3/CQL.textile | 19 +++ 2 files changed, 18 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a2141ce/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a2141ce/doc/cql3/CQL.textile --
[jira] [Commented] (CASSANDRA-6836) WriteTimeoutException always reports that the serial CL is SERIAL
[ https://issues.apache.org/jira/browse/CASSANDRA-6836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940683#comment-13940683 ] Irfan Nagoo commented on CASSANDRA-6836: Sure, they look relevant.Thanks Jonathan! WriteTimeoutException always reports that the serial CL is SERIAL --- Key: CASSANDRA-6836 URL: https://issues.apache.org/jira/browse/CASSANDRA-6836 Project: Cassandra Issue Type: Bug Components: Core Reporter: Nicolas Favre-Felix Assignee: Irfan Nagoo Priority: Minor Labels: lhf Attachments: trunk-6836.txt In StorageProxy.proposePaxos, the WriteTimeoutException is thrown with information about the consistency level. This CL is hardcoded to ConsistencyLevel.SERIAL, which might be wrong when LOCAL_SERIAL is used: {code} if (timeoutIfPartial !callback.isFullyRefused()) throw new WriteTimeoutException(WriteType.CAS, ConsistencyLevel.SERIAL, callback.getAcceptCount(), requiredParticipants); {code} Suggested fix: pass consistencyForPaxos as a parameter to proposePaxos(). -- This message was sent by Atlassian JIRA (v6.2#6252)
[1/4] ByteBuffer write() methods for serializing sstables
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 2a2141ce6 - 75508ec89 http://git-wip-us.apache.org/repos/asf/cassandra/blob/75508ec8/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java -- diff --git a/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java b/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java new file mode 100644 index 000..4f6d652 --- /dev/null +++ b/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java @@ -0,0 +1,162 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.cassandra.utils; + +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.Random; + +import org.junit.Test; + +public class FastByteOperationsTest +{ + +private static final FastByteOperations.PureJavaOperations PJO = new FastByteOperations.PureJavaOperations(); +private static final FastByteOperations.UnsafeOperations UO = new FastByteOperations.UnsafeOperations(); +private static final Random rand = new Random(0); +private static final ByteBuffer dbuf1 = ByteBuffer.allocateDirect(150); +private static final ByteBuffer dbuf2 = ByteBuffer.allocateDirect(150); +private static final ByteBuffer hbuf1 = ByteBuffer.allocate(150); +private static final ByteBuffer hbuf2 = ByteBuffer.allocate(150); + +@Test +public void testFastByteCopy() +{ +byte[] bytes1 = new byte[128]; +byte[] empty = new byte[128]; +rand.nextBytes(bytes1); +testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, true), PJO); +testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, false), PJO); +testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, true), PJO); +testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, false), PJO); +testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, true), UO); +testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, false), UO); +testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, true), UO); +testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, false), UO); +} + +private void testCopy(byte[] canon, ByteBuffer src, ByteBuffer trg, FastByteOperations.ByteOperations ops) +{ +byte[] result = new byte[src.remaining()]; +ops.copy(src, src.position(), trg, trg.position(), src.remaining()); +ops.copy(trg, trg.position(), result, 0, trg.remaining()); +assert firstdiff(canon, result) 0; +} + +private static int firstdiff(byte[] canon, byte[] test) +{ +for (int i = 0 ; i canon.length ; i++) +if (canon[i] != test[i]) +return i; +return -1; +} + +@Test +public void testFastByteComparisons() +{ +byte[] bytes1 = new byte[128]; +for (int i = 0 ; i 1000 ; i++) +{ +rand.nextBytes(bytes1); +for (int j = 0 ; j 16 ; j++) +{ +byte[] bytes2 = Arrays.copyOf(bytes1, bytes1.length - j); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, 1); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, -1); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, 1); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, -1); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, 128); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, 128); +} +} +} + +private void testTwiddleOneByteComparisons(byte[] bytes1, byte[] bytes2, int count, boolean start, int inc) +{ +for (int j = 0 ; j count ; j++) +{ +int index = start ? j : bytes2.length - (j + 1); +bytes2[index] += inc; +testComparisons(bytes1, bytes2); +bytes2[index] -= inc; +} +} + +private static ByteBuffer wrap1(byte[] bytes, boolean direct) +{ +return slice(bytes, direct ? dbuf1 : hbuf1); +} + +private static ByteBuffer wrap2(byte[] bytes, boolean direct) +{ +return slice(bytes, direct ? dbuf2 : hbuf2); +} + +
[5/5] 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/9f057832 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9f057832 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9f057832 Branch: refs/heads/trunk Commit: 9f057832e3796635eb4fc1f6d757dffed0d47c4e Parents: 00317fc 75508ec Author: Marcus Eriksson marc...@apache.org Authored: Wed Mar 19 18:01:48 2014 +0100 Committer: Marcus Eriksson marc...@apache.org Committed: Wed Mar 19 18:01:48 2014 +0100 -- CHANGES.txt | 1 + .../apache/cassandra/cache/AutoSavingCache.java | 3 +- .../cache/SerializingCacheProvider.java | 4 +- .../apache/cassandra/db/BatchlogManager.java| 12 +- .../cassandra/db/ColumnFamilySerializer.java| 7 +- .../org/apache/cassandra/db/ColumnIndex.java| 6 +- .../apache/cassandra/db/ColumnSerializer.java | 4 +- .../apache/cassandra/db/CounterMutation.java| 3 +- .../org/apache/cassandra/db/DeletionInfo.java | 4 +- .../org/apache/cassandra/db/DeletionTime.java | 4 +- src/java/org/apache/cassandra/db/Mutation.java | 4 +- .../org/apache/cassandra/db/OnDiskAtom.java | 3 +- .../apache/cassandra/db/PagedRangeCommand.java | 4 +- .../apache/cassandra/db/RangeSliceCommand.java | 4 +- .../apache/cassandra/db/RangeSliceReply.java| 4 +- .../org/apache/cassandra/db/RangeTombstone.java | 5 +- .../apache/cassandra/db/RangeTombstoneList.java | 4 +- .../org/apache/cassandra/db/ReadCommand.java| 4 +- .../org/apache/cassandra/db/ReadResponse.java | 5 +- src/java/org/apache/cassandra/db/Row.java | 3 +- .../org/apache/cassandra/db/RowIndexEntry.java | 4 +- .../org/apache/cassandra/db/RowPosition.java| 4 +- .../cassandra/db/SliceByNamesReadCommand.java | 3 +- .../cassandra/db/SliceFromReadCommand.java | 4 +- .../apache/cassandra/db/SnapshotCommand.java| 4 +- .../apache/cassandra/db/TruncateResponse.java | 4 +- .../org/apache/cassandra/db/Truncation.java | 4 +- .../org/apache/cassandra/db/WriteResponse.java | 4 +- .../cassandra/db/commitlog/CommitLog.java | 8 +- .../cassandra/db/commitlog/ReplayPosition.java | 4 +- .../db/compaction/AbstractCompactedRow.java | 3 +- .../db/compaction/LazilyCompactedRow.java | 3 +- .../cassandra/db/composites/AbstractCType.java | 4 +- .../db/composites/AbstractCellNameType.java | 4 +- .../apache/cassandra/db/filter/ColumnSlice.java | 4 +- .../cassandra/db/filter/IDiskAtomFilter.java| 5 +- .../cassandra/db/filter/NamesQueryFilter.java | 4 +- .../cassandra/db/filter/SliceQueryFilter.java | 4 +- .../apache/cassandra/dht/AbstractBounds.java| 3 +- .../org/apache/cassandra/dht/BootStrapper.java | 4 +- src/java/org/apache/cassandra/dht/Token.java| 4 +- .../org/apache/cassandra/gms/EchoMessage.java | 4 +- .../org/apache/cassandra/gms/EndpointState.java | 3 +- .../org/apache/cassandra/gms/GossipDigest.java | 3 +- .../apache/cassandra/gms/GossipDigestAck.java | 4 +- .../apache/cassandra/gms/GossipDigestAck2.java | 3 +- .../apache/cassandra/gms/GossipDigestSyn.java | 5 +- .../apache/cassandra/gms/HeartBeatState.java| 3 +- .../apache/cassandra/gms/VersionedValue.java| 3 +- .../apache/cassandra/io/ISSTableSerializer.java | 5 +- .../org/apache/cassandra/io/ISerializer.java| 6 +- .../cassandra/io/IVersionedSerializer.java | 6 +- .../io/compress/CompressionMetadata.java| 3 +- .../io/compress/CompressionParameters.java | 4 +- .../cassandra/io/sstable/IndexHelper.java | 3 +- .../cassandra/io/sstable/IndexSummary.java | 7 +- .../cassandra/io/sstable/SSTableReader.java | 4 +- .../cassandra/io/sstable/SSTableWriter.java | 4 +- .../io/sstable/metadata/CompactionMetadata.java | 4 +- .../metadata/IMetadataComponentSerializer.java | 5 +- .../sstable/metadata/IMetadataSerializer.java | 6 +- .../metadata/LegacyMetadataSerializer.java | 3 +- .../io/sstable/metadata/MetadataSerializer.java | 6 +- .../io/sstable/metadata/StatsMetadata.java | 4 +- .../io/sstable/metadata/ValidationMetadata.java | 4 +- .../cassandra/io/util/AbstractDataOutput.java | 43 +- .../io/util/ByteBufferOutputStream.java | 46 -- .../io/util/ChecksummedOutputStream.java| 56 --- .../cassandra/io/util/DataOutputBuffer.java | 23 +- .../cassandra/io/util/DataOutputByteBuffer.java | 59 +++ .../cassandra/io/util/DataOutputPlus.java | 32 ++ .../io/util/DataOutputStreamAndChannel.java | 55 +++ .../cassandra/io/util/DataOutputStreamPlus.java | 57 +++ .../io/util/FastByteArrayOutputStream.java | 11 +
[1/5] ByteBuffer write() methods for serializing sstables
Repository: cassandra Updated Branches: refs/heads/trunk 00317fc8f - 9f057832e http://git-wip-us.apache.org/repos/asf/cassandra/blob/75508ec8/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java -- diff --git a/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java b/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java new file mode 100644 index 000..4f6d652 --- /dev/null +++ b/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java @@ -0,0 +1,162 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.cassandra.utils; + +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.Random; + +import org.junit.Test; + +public class FastByteOperationsTest +{ + +private static final FastByteOperations.PureJavaOperations PJO = new FastByteOperations.PureJavaOperations(); +private static final FastByteOperations.UnsafeOperations UO = new FastByteOperations.UnsafeOperations(); +private static final Random rand = new Random(0); +private static final ByteBuffer dbuf1 = ByteBuffer.allocateDirect(150); +private static final ByteBuffer dbuf2 = ByteBuffer.allocateDirect(150); +private static final ByteBuffer hbuf1 = ByteBuffer.allocate(150); +private static final ByteBuffer hbuf2 = ByteBuffer.allocate(150); + +@Test +public void testFastByteCopy() +{ +byte[] bytes1 = new byte[128]; +byte[] empty = new byte[128]; +rand.nextBytes(bytes1); +testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, true), PJO); +testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, false), PJO); +testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, true), PJO); +testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, false), PJO); +testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, true), UO); +testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, false), UO); +testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, true), UO); +testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, false), UO); +} + +private void testCopy(byte[] canon, ByteBuffer src, ByteBuffer trg, FastByteOperations.ByteOperations ops) +{ +byte[] result = new byte[src.remaining()]; +ops.copy(src, src.position(), trg, trg.position(), src.remaining()); +ops.copy(trg, trg.position(), result, 0, trg.remaining()); +assert firstdiff(canon, result) 0; +} + +private static int firstdiff(byte[] canon, byte[] test) +{ +for (int i = 0 ; i canon.length ; i++) +if (canon[i] != test[i]) +return i; +return -1; +} + +@Test +public void testFastByteComparisons() +{ +byte[] bytes1 = new byte[128]; +for (int i = 0 ; i 1000 ; i++) +{ +rand.nextBytes(bytes1); +for (int j = 0 ; j 16 ; j++) +{ +byte[] bytes2 = Arrays.copyOf(bytes1, bytes1.length - j); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, 1); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, -1); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, 1); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, -1); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, 128); +testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, 128); +} +} +} + +private void testTwiddleOneByteComparisons(byte[] bytes1, byte[] bytes2, int count, boolean start, int inc) +{ +for (int j = 0 ; j count ; j++) +{ +int index = start ? j : bytes2.length - (j + 1); +bytes2[index] += inc; +testComparisons(bytes1, bytes2); +bytes2[index] -= inc; +} +} + +private static ByteBuffer wrap1(byte[] bytes, boolean direct) +{ +return slice(bytes, direct ? dbuf1 : hbuf1); +} + +private static ByteBuffer wrap2(byte[] bytes, boolean direct) +{ +return slice(bytes, direct ? dbuf2 : hbuf2); +} + +private
[3/6] git commit: Add uuid() function patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473
Add uuid() function patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/32c15c2f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/32c15c2f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/32c15c2f Branch: refs/heads/trunk Commit: 32c15c2fb0d31a8f061a8fb812c2d4851d52ef2f Parents: 91e4d22 Author: Carl Yeksigian c...@yeksigian.com Authored: Sat Mar 15 20:11:46 2014 -0400 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 11:38:26 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile| 4 ++ .../cassandra/cql3/functions/Functions.java | 1 + .../cassandra/cql3/functions/UuidFcts.java | 42 4 files changed, 48 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2bb3605..41ec1d7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.7 + * Add uuid() function (CASSANDRA-6473) * Omit tombstones from schema digests (CASSANDRA-6862) * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index 566d13c..b323f20 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -1007,6 +1007,10 @@ CREATE TABLE users ( then the @token@ function will take a single argument of type @text@ (in that case, the partition key is @userid@ (there is no clustering columns so the partition key is the same than the primary key)), and the return type will be @bigint@. +h3(#uuidFun). Uuid + +The @uuid@ function takes no parameters and generates a random type 4 uuid suitable for use in INSERT or SET statements. + h3(#timeuuidFun). Timeuuid functions h4. @now@ http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/Functions.java -- diff --git a/src/java/org/apache/cassandra/cql3/functions/Functions.java b/src/java/org/apache/cassandra/cql3/functions/Functions.java index 97a0e91..5f4201d 100644 --- a/src/java/org/apache/cassandra/cql3/functions/Functions.java +++ b/src/java/org/apache/cassandra/cql3/functions/Functions.java @@ -44,6 +44,7 @@ public abstract class Functions declared.put(maxtimeuuid, AbstractFunction.factory(TimeuuidFcts.maxTimeuuidFct)); declared.put(dateof, AbstractFunction.factory(TimeuuidFcts.dateOfFct)); declared.put(unixtimestampof, AbstractFunction.factory(TimeuuidFcts.unixTimestampOfFct)); +declared.put(uuid, AbstractFunction.factory(UuidFcts.uuidFct)); for (CQL3Type type : CQL3Type.Native.values()) { http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java -- diff --git a/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java new file mode 100644 index 000..718bcbc --- /dev/null +++ b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.cassandra.cql3.functions; + +import java.nio.ByteBuffer; +import java.util.List; +import java.util.UUID; + +import org.apache.cassandra.db.marshal.UUIDType; +import org.apache.cassandra.serializers.UUIDSerializer; + +public abstract class UuidFcts +{ +public static final Function uuidFct = new AbstractFunction(uuid, UUIDType.instance) +{ +public ByteBuffer
[jira] [Commented] (CASSANDRA-6506) counters++ split counter context shards into separate cells
[ https://issues.apache.org/jira/browse/CASSANDRA-6506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940608#comment-13940608 ] Sylvain Lebresne commented on CASSANDRA-6506: - To me, the main interest of doing this is to as much of special casing of counters at the storage engine layer as possible, to basically make counters just a bunch of normal cells. In that regard, I'm not convinced it's worth having special cellname implementations: the 3 methods added could easily be static methods of say CounterColumns, thus removing a bunch of code, and making it clear counters are just an encoding on top of the storage engine. I'm also uncomfortable with originalType() (and enableCounters() to some extend). It feels pretty error prone as you need to think hard about whether you you call that first before calling some other method or not. It feels to me that again, we shouldn't need anything special with CellNameType for counters: thrift/CQL should convert things to/from the internal format, but as far as CellName/CellNameType are concerned, we shouldn't need anything special casing at all (I do understand that we probably need to start storing whether the table is dense or not in the system table for thrift to convert things properly, but it's high time we do that anyway). In fact, I'm starting to think that the best way to do this would be to internally deal with counters as (CQL) maps of shard id - count. This would allow reuse of the existing as often as possible (we wouldn't need modification of CQL3RowOfSparse for instance). One obstacle to that is that collections only work with true CQL3 table, and we need to deal with thrift CF of counters, but honestly, I think I'd be fine encoding those as true CQL3 tables under the hood having just one CQL column (that could have an empty name). With compression and since counters table will be composite under the hood anyway, I'm not sure the overhead would be noticeable and it would definitively simplify matters. Also, tbh, I'm starting to wonder if 2.1 is such a reasonable target for this at this point. Especially given we can't get rid of CounterCell right now (I think we should seriously consider getting rid of local/remote shard for 3.0) this feels like a lot of changes to push at the last minute, and it doesn't felt like it brings so much to the table that it can't wait 3.0. Especially since in 3.0 it might be achievable to get rid of CounterCell once and for all (and we wouldn't have to care about CQL2). Outside of those general comments, a few minor remarks/nits gathered from reading the patch: * isSameCQL3RowAs should use the comparator, not equals(). * I believe disallowing the drop of columns for CQL3 counter tables is a regression. Not sure why the patch does it tbh. * Nit: I'd remove the 'clock' arg to CounterUpdateCell.create() and hardcode it to 1 inside the method to avoid misuse. * Nit: I was liking the inital comment of CounterUpdateCell.reconcile, I'd be happy keeping it. counters++ split counter context shards into separate cells --- Key: CASSANDRA-6506 URL: https://issues.apache.org/jira/browse/CASSANDRA-6506 Project: Cassandra Issue Type: Improvement Reporter: Aleksey Yeschenko Assignee: Aleksey Yeschenko Fix For: 2.1 beta2 This change is related to, but somewhat orthogonal to CASSANDRA-6504. Currently all the shard tuples for a given counter cell are packed, in sorted order, in one binary blob. Thus reconciling N counter cells requires allocating a new byte buffer capable of holding the union of the two context's shards N-1 times. For writes, in post CASSANDRA-6504 world, it also means reading more data than we have to (the complete context, when all we need is the local node's global shard). Splitting the context into separate cells, one cell per shard, will help to improve this. We did a similar thing with super columns for CASSANDRA-3237. Incidentally, doing this split is now possible thanks to CASSANDRA-3237. Doing this would also simplify counter reconciliation logic. Getting rid of old contexts altogether can be done trivially with upgradesstables. In fact, we should be able to put the logical clock into the cell's timestamp, and use regular Cell-s and regular Cell reconcile() logic for the shards, especially once we get rid of the local/remote shards some time in the future (until then we still have to differentiate between global/remote/local shards and their priority rules). -- This message was sent by Atlassian JIRA (v6.2#6252)
[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/00317fc8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/00317fc8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/00317fc8 Branch: refs/heads/trunk Commit: 00317fc8f33f146ece0b1bb4376e548e26c5df8e Parents: 96b55ce 2a2141c Author: Tyler Hobbs ty...@datastax.com Authored: Wed Mar 19 11:43:36 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Mar 19 11:43:36 2014 -0500 -- CHANGES.txt | 4 +++- doc/cql3/CQL.textile | 19 +++ 2 files changed, 18 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/00317fc8/CHANGES.txt --
[4/6] git commit: merge from 2.0
merge from 2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a45fea8f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a45fea8f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a45fea8f Branch: refs/heads/trunk Commit: a45fea8fc67f770556a915b80ef6bea0c62ae3ee Parents: 0ccee7f 32c15c2 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 11:38:54 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 11:38:54 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile| 4 ++ .../cassandra/cql3/functions/Functions.java | 1 + .../cassandra/cql3/functions/UuidFcts.java | 42 4 files changed, 48 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/CHANGES.txt -- diff --cc CHANGES.txt index 159d242,41ec1d7..75f4cee --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,29 -1,5 +1,30 @@@ -2.0.7 +2.1.0-beta2 + * Eliminate possibility of CL segment appearing twice in active list + (CASSANDRA-6557) + * Apply DONTNEED fadvise to commitlog segments (CASSANDRA-6759) + * Switch CRC component to Adler and include it for compressed sstables + (CASSANDRA-4165) + * Allow cassandra-stress to set compaction strategy options (CASSANDRA-6451) + * Add broadcast_rpc_address option to cassandra.yaml (CASSANDRA-5899) + * Auto reload GossipingPropertyFileSnitch config (CASSANDRA-5897) + * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573) + * Fix ABTC NPE and apply update function correctly (CASSANDRA-6692) + * Allow nodetool to use a file or prompt for password (CASSANDRA-6660) + * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742) + * Fix assertion error in ALTER TYPE RENAME (CASSANDRA-6705) + * Scrub should not always clear out repaired status (CASSANDRA-5351) + * Improve handling of range tombstone for wide partitions (CASSANDRA-6446) + * Fix ClassCastException for compact table with composites (CASSANDRA-6738) + * Fix potentially repairing with wrong nodes (CASSANDRA-6808) + * Change caching option syntax (CASSANDRA-6745) + * Fix stress to do proper counter reads (CASSANDRA-6835) + * Fix help message for stress counter_write (CASSANDRA-6824) + * Fix stress smart Thrift client to pick servers correctly (CASSANDRA-6848) + * Add logging levels (minimal, normal or verbose) to stress tool (CASSANDRA-6849) + * Fix race condition in Batch CLE (CASSANDRA-6860) + * Improve cleanup/scrub/upgradesstables failure handling (CASSANDRA-6774) +Merged from 2.0: + * Add uuid() function (CASSANDRA-6473) * Omit tombstones from schema digests (CASSANDRA-6862) * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/doc/cql3/CQL.textile -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/src/java/org/apache/cassandra/cql3/functions/Functions.java --
[2/6] git commit: Add uuid() function patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473
Add uuid() function patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/32c15c2f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/32c15c2f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/32c15c2f Branch: refs/heads/cassandra-2.1 Commit: 32c15c2fb0d31a8f061a8fb812c2d4851d52ef2f Parents: 91e4d22 Author: Carl Yeksigian c...@yeksigian.com Authored: Sat Mar 15 20:11:46 2014 -0400 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 11:38:26 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile| 4 ++ .../cassandra/cql3/functions/Functions.java | 1 + .../cassandra/cql3/functions/UuidFcts.java | 42 4 files changed, 48 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 2bb3605..41ec1d7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.7 + * Add uuid() function (CASSANDRA-6473) * Omit tombstones from schema digests (CASSANDRA-6862) * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884) * Lower chances for losing new SSTables during nodetool refresh and http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index 566d13c..b323f20 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -1007,6 +1007,10 @@ CREATE TABLE users ( then the @token@ function will take a single argument of type @text@ (in that case, the partition key is @userid@ (there is no clustering columns so the partition key is the same than the primary key)), and the return type will be @bigint@. +h3(#uuidFun). Uuid + +The @uuid@ function takes no parameters and generates a random type 4 uuid suitable for use in INSERT or SET statements. + h3(#timeuuidFun). Timeuuid functions h4. @now@ http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/Functions.java -- diff --git a/src/java/org/apache/cassandra/cql3/functions/Functions.java b/src/java/org/apache/cassandra/cql3/functions/Functions.java index 97a0e91..5f4201d 100644 --- a/src/java/org/apache/cassandra/cql3/functions/Functions.java +++ b/src/java/org/apache/cassandra/cql3/functions/Functions.java @@ -44,6 +44,7 @@ public abstract class Functions declared.put(maxtimeuuid, AbstractFunction.factory(TimeuuidFcts.maxTimeuuidFct)); declared.put(dateof, AbstractFunction.factory(TimeuuidFcts.dateOfFct)); declared.put(unixtimestampof, AbstractFunction.factory(TimeuuidFcts.unixTimestampOfFct)); +declared.put(uuid, AbstractFunction.factory(UuidFcts.uuidFct)); for (CQL3Type type : CQL3Type.Native.values()) { http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java -- diff --git a/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java new file mode 100644 index 000..718bcbc --- /dev/null +++ b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * License); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.cassandra.cql3.functions; + +import java.nio.ByteBuffer; +import java.util.List; +import java.util.UUID; + +import org.apache.cassandra.db.marshal.UUIDType; +import org.apache.cassandra.serializers.UUIDSerializer; + +public abstract class UuidFcts +{ +public static final Function uuidFct = new AbstractFunction(uuid, UUIDType.instance) +{ +public ByteBuffer
git commit: Add UNLOGGED, COUNTER options to BATCH docs
Repository: cassandra Updated Branches: refs/heads/cassandra-1.2 300853232 - 7e870018d Add UNLOGGED, COUNTER options to BATCH docs patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-6816 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7e870018 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7e870018 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7e870018 Branch: refs/heads/cassandra-1.2 Commit: 7e870018dc2b1b78cf1754056c260c77379d5b47 Parents: 3008532 Author: Tyler Hobbs ty...@datastax.com Authored: Wed Mar 19 11:37:09 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Mar 19 11:37:09 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile | 19 +++ 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index f88345d..960b0e9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2.16 + * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816) * add extra SSL cipher suites (CASSANDRA-6613) * fix nodetool getsstables for blob PK (CASSANDRA-6803) * Add CMSClassUnloadingEnabled JVM option (CASSANDRA-6541) http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index ecd3b7e..91e2625 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -536,7 +536,7 @@ h3(#batchStmt). BATCH __Syntax:__ bc(syntax).. -batch-stmt ::= BEGIN BATCH +batch-stmt ::= BEGIN ( UNLOGGED | COUNTER ) BATCH ( USING option ( AND option )* )? modification-stmt ( ';' modification-stmt )* APPLY BATCH @@ -557,11 +557,22 @@ BEGIN BATCH DELETE name FROM users WHERE userid = 'user1'; APPLY BATCH; -The @BATCH@ statement group multiple modification statements (insertions/updates and deletions) into a single statement. It mainly serves two purposes: -# it saves network round-trips between the client and the server (and sometimes between the server coordinator and the replicas) when batching multiple updates. -# all updates in a @BATCH@ belonging to a given partition key are performed atomically and in isolation +The @BATCH@ statement group multiple modification statements (insertions/updates and deletions) into a single statement. It serves several purposes: +# It saves network round-trips between the client and the server (and sometimes between the server coordinator and the replicas) when batching multiple updates. +# All updates in a @BATCH@ belonging to a given partition key are performed in isolation. +# By default, all operations in the batch are performed atomically. See the notes on @UNLOGGED@:#unloggedBatch for more details. Note however that the @BATCH@ statement only allows @UPDATE@, @INSERT@ and @DELETE@ statements and is _not_ a full analogue for SQL transactions. +h4(#unloggedBatch). @UNLOGGED@ + +By default, Cassandra uses a batch log to ensure all operations in a batch are applied atomically. (Note that the operations are still only isolated within a single partition.) + +There is a performance penalty for batch atomicity when a batch spans multiple partitions. If you do not want to incur this penalty, you can tell Cassandra to skip the batchlog with the @UNLOGGED@ option. If the @UNLOGGED@ option is used, operations are only atomic within a single partition. + +h4(#counterBatch). @COUNTER@ + +Use the @COUNTER@ option for batched counter updates. Unlike other updates in Cassandra, counter updates are not idempotent. + h4(#batchOptions). @option@ @BATCH@ supports both the @TIMESTAMP@ option, with similar semantic to the one described in the @UPDATE@:#updateOptions statement (the timestamp applies to all the statement inside the batch). However, if used, @TIMESTAMP@ *must not* be used in the statements within the batch.
[6/6] 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/96b55cec Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/96b55cec Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/96b55cec Branch: refs/heads/trunk Commit: 96b55cecc37d69c0a3bc292ed9c0e12452559fda Parents: 51e41a7 a45fea8 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 11:39:13 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 11:39:13 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile| 4 ++ .../cassandra/cql3/functions/Functions.java | 1 + .../cassandra/cql3/functions/UuidFcts.java | 42 4 files changed, 48 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/96b55cec/CHANGES.txt --
[02/16] git commit: r/m unused code from ThriftServer/TServerFactory patch by Ed Capriolo; reviewed by jbellis for CASSANDRA-6854
r/m unused code from ThriftServer/TServerFactory patch by Ed Capriolo; reviewed by jbellis for CASSANDRA-6854 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9ef3eeec Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9ef3eeec Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9ef3eeec Branch: refs/heads/trunk Commit: 9ef3eeec13b1cd30b35780def9cc35923193dfe9 Parents: a45fea8 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 11:46:20 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 11:46:20 2014 -0500 -- src/java/org/apache/cassandra/thrift/TServerFactory.java | 1 - src/java/org/apache/cassandra/thrift/ThriftServer.java | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9ef3eeec/src/java/org/apache/cassandra/thrift/TServerFactory.java -- diff --git a/src/java/org/apache/cassandra/thrift/TServerFactory.java b/src/java/org/apache/cassandra/thrift/TServerFactory.java index ec3d61b..09014ce 100644 --- a/src/java/org/apache/cassandra/thrift/TServerFactory.java +++ b/src/java/org/apache/cassandra/thrift/TServerFactory.java @@ -33,7 +33,6 @@ public interface TServerFactory { public InetSocketAddress addr; public Integer listenBacklog; -public CassandraServer cassandraServer; public TProcessor processor; public TProtocolFactory tProtocolFactory; public TTransportFactory inTransportFactory; http://git-wip-us.apache.org/repos/asf/cassandra/blob/9ef3eeec/src/java/org/apache/cassandra/thrift/ThriftServer.java -- diff --git a/src/java/org/apache/cassandra/thrift/ThriftServer.java b/src/java/org/apache/cassandra/thrift/ThriftServer.java index d233850..2aef2e3 100644 --- a/src/java/org/apache/cassandra/thrift/ThriftServer.java +++ b/src/java/org/apache/cassandra/thrift/ThriftServer.java @@ -55,7 +55,7 @@ public class ThriftServer implements CassandraDaemon.Server if (server == null) { CassandraServer iface = getCassandraServer(); -server = new ThriftServerThread(address, port, backlog, iface, getProcessor(iface), getTransportFactory()); +server = new ThriftServerThread(address, port, backlog, getProcessor(iface), getTransportFactory()); server.start(); } } @@ -112,7 +112,6 @@ public class ThriftServer implements CassandraDaemon.Server public ThriftServerThread(InetAddress listenAddr, int listenPort, int listenBacklog, - CassandraServer server, TProcessor processor, TTransportFactory transportFactory) { @@ -123,7 +122,6 @@ public class ThriftServer implements CassandraDaemon.Server args.tProtocolFactory = new TBinaryProtocol.Factory(true, true); args.addr = new InetSocketAddress(listenAddr, listenPort); args.listenBacklog = listenBacklog; -args.cassandraServer = server; args.processor = processor; args.keepAlive = DatabaseDescriptor.getRpcKeepAlive(); args.sendBufferSize = DatabaseDescriptor.getRpcSendBufferSize();
[03/16] 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/f0227a6c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f0227a6c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f0227a6c Branch: refs/heads/trunk Commit: f0227a6c1ca8dab34c1b8cfe095ce8e0a2dde28e Parents: 96b55ce 9ef3eee Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 11:46:27 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 11:46:27 2014 -0500 -- src/java/org/apache/cassandra/thrift/TServerFactory.java | 1 - src/java/org/apache/cassandra/thrift/ThriftServer.java | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) --
[05/16] git commit: comment CqlRow for #6807
comment CqlRow for #6807 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/73a3eeb6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/73a3eeb6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/73a3eeb6 Branch: refs/heads/trunk Commit: 73a3eeb6f679adeb6982229ad730437177a0430d Parents: 7e87001 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:10:52 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:10:52 2014 -0500 -- interface/cassandra.thrift | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a3eeb6/interface/cassandra.thrift -- diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift index 1fc7201..4eda4f8 100644 --- a/interface/cassandra.thrift +++ b/interface/cassandra.thrift @@ -496,7 +496,14 @@ enum CqlResultType { INT = 3 } -/** Row returned from a CQL query */ +/** + Row returned from a CQL query. + + This struct is used for both CQL2 and CQL3 queries. For CQL2, the partition key + is special-cased and is always returned. For CQL3, it is not special cased; + it will be included in the columns list if it was included in the SELECT and + the key field is always null. +*/ struct CqlRow { 1: required binary key, 2: required listColumn columns
[06/16] git commit: comment CqlRow for #6807
comment CqlRow for #6807 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/73a3eeb6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/73a3eeb6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/73a3eeb6 Branch: refs/heads/cassandra-2.1 Commit: 73a3eeb6f679adeb6982229ad730437177a0430d Parents: 7e87001 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:10:52 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:10:52 2014 -0500 -- interface/cassandra.thrift | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a3eeb6/interface/cassandra.thrift -- diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift index 1fc7201..4eda4f8 100644 --- a/interface/cassandra.thrift +++ b/interface/cassandra.thrift @@ -496,7 +496,14 @@ enum CqlResultType { INT = 3 } -/** Row returned from a CQL query */ +/** + Row returned from a CQL query. + + This struct is used for both CQL2 and CQL3 queries. For CQL2, the partition key + is special-cased and is always returned. For CQL3, it is not special cased; + it will be included in the columns list if it was included in the SELECT and + the key field is always null. +*/ struct CqlRow { 1: required binary key, 2: required listColumn columns
[04/16] git commit: comment CqlRow for #6807
comment CqlRow for #6807 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/73a3eeb6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/73a3eeb6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/73a3eeb6 Branch: refs/heads/cassandra-2.0 Commit: 73a3eeb6f679adeb6982229ad730437177a0430d Parents: 7e87001 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:10:52 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:10:52 2014 -0500 -- interface/cassandra.thrift | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a3eeb6/interface/cassandra.thrift -- diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift index 1fc7201..4eda4f8 100644 --- a/interface/cassandra.thrift +++ b/interface/cassandra.thrift @@ -496,7 +496,14 @@ enum CqlResultType { INT = 3 } -/** Row returned from a CQL query */ +/** + Row returned from a CQL query. + + This struct is used for both CQL2 and CQL3 queries. For CQL2, the partition key + is special-cased and is always returned. For CQL3, it is not special cased; + it will be included in the columns list if it was included in the SELECT and + the key field is always null. +*/ struct CqlRow { 1: required binary key, 2: required listColumn columns
[16/16] 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/335aa9f1 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/335aa9f1 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/335aa9f1 Branch: refs/heads/trunk Commit: 335aa9f1f6cd25be6990f8df2e5839b7806edac6 Parents: e13b11d 6e366e3 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:12:11 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:12:11 2014 -0500 -- interface/cassandra.thrift | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/335aa9f1/interface/cassandra.thrift --
[12/16] git commit: Merge remote-tracking branch 'origin/cassandra-2.1' into cassandra-2.1
Merge remote-tracking branch 'origin/cassandra-2.1' 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/350657c6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/350657c6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/350657c6 Branch: refs/heads/cassandra-2.1 Commit: 350657c64d4caee378ec310b1b19fb1e7427b9ef Parents: 9ef3eee 75508ec Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:11:12 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:11:12 2014 -0500 -- CHANGES.txt | 5 +- doc/cql3/CQL.textile| 19 +- .../apache/cassandra/cache/AutoSavingCache.java | 3 +- .../cache/SerializingCacheProvider.java | 4 +- .../apache/cassandra/db/BatchlogManager.java| 12 +- .../cassandra/db/ColumnFamilySerializer.java| 7 +- .../org/apache/cassandra/db/ColumnIndex.java| 6 +- .../apache/cassandra/db/ColumnSerializer.java | 4 +- .../apache/cassandra/db/CounterMutation.java| 3 +- .../org/apache/cassandra/db/DeletionInfo.java | 4 +- .../org/apache/cassandra/db/DeletionTime.java | 4 +- src/java/org/apache/cassandra/db/Mutation.java | 4 +- .../org/apache/cassandra/db/OnDiskAtom.java | 3 +- .../apache/cassandra/db/PagedRangeCommand.java | 4 +- .../apache/cassandra/db/RangeSliceCommand.java | 4 +- .../apache/cassandra/db/RangeSliceReply.java| 4 +- .../org/apache/cassandra/db/RangeTombstone.java | 5 +- .../apache/cassandra/db/RangeTombstoneList.java | 4 +- .../org/apache/cassandra/db/ReadCommand.java| 4 +- .../org/apache/cassandra/db/ReadResponse.java | 5 +- src/java/org/apache/cassandra/db/Row.java | 3 +- .../org/apache/cassandra/db/RowIndexEntry.java | 4 +- .../org/apache/cassandra/db/RowPosition.java| 4 +- .../cassandra/db/SliceByNamesReadCommand.java | 3 +- .../cassandra/db/SliceFromReadCommand.java | 4 +- .../apache/cassandra/db/SnapshotCommand.java| 4 +- .../apache/cassandra/db/TruncateResponse.java | 4 +- .../org/apache/cassandra/db/Truncation.java | 4 +- .../org/apache/cassandra/db/WriteResponse.java | 4 +- .../cassandra/db/commitlog/CommitLog.java | 8 +- .../cassandra/db/commitlog/ReplayPosition.java | 4 +- .../db/compaction/AbstractCompactedRow.java | 3 +- .../db/compaction/LazilyCompactedRow.java | 3 +- .../cassandra/db/composites/AbstractCType.java | 4 +- .../db/composites/AbstractCellNameType.java | 4 +- .../apache/cassandra/db/filter/ColumnSlice.java | 4 +- .../cassandra/db/filter/IDiskAtomFilter.java| 5 +- .../cassandra/db/filter/NamesQueryFilter.java | 4 +- .../cassandra/db/filter/SliceQueryFilter.java | 4 +- .../apache/cassandra/dht/AbstractBounds.java| 3 +- .../org/apache/cassandra/dht/BootStrapper.java | 4 +- src/java/org/apache/cassandra/dht/Token.java| 4 +- .../org/apache/cassandra/gms/EchoMessage.java | 4 +- .../org/apache/cassandra/gms/EndpointState.java | 3 +- .../org/apache/cassandra/gms/GossipDigest.java | 3 +- .../apache/cassandra/gms/GossipDigestAck.java | 4 +- .../apache/cassandra/gms/GossipDigestAck2.java | 3 +- .../apache/cassandra/gms/GossipDigestSyn.java | 5 +- .../apache/cassandra/gms/HeartBeatState.java| 3 +- .../apache/cassandra/gms/VersionedValue.java| 3 +- .../apache/cassandra/io/ISSTableSerializer.java | 5 +- .../org/apache/cassandra/io/ISerializer.java| 6 +- .../cassandra/io/IVersionedSerializer.java | 6 +- .../io/compress/CompressionMetadata.java| 3 +- .../io/compress/CompressionParameters.java | 4 +- .../cassandra/io/sstable/IndexHelper.java | 3 +- .../cassandra/io/sstable/IndexSummary.java | 7 +- .../cassandra/io/sstable/SSTableReader.java | 4 +- .../cassandra/io/sstable/SSTableWriter.java | 4 +- .../io/sstable/metadata/CompactionMetadata.java | 4 +- .../metadata/IMetadataComponentSerializer.java | 5 +- .../sstable/metadata/IMetadataSerializer.java | 6 +- .../metadata/LegacyMetadataSerializer.java | 3 +- .../io/sstable/metadata/MetadataSerializer.java | 6 +- .../io/sstable/metadata/StatsMetadata.java | 4 +- .../io/sstable/metadata/ValidationMetadata.java | 4 +- .../cassandra/io/util/AbstractDataOutput.java | 43 +- .../io/util/ByteBufferOutputStream.java | 46 -- .../io/util/ChecksummedOutputStream.java| 56 --- .../cassandra/io/util/DataOutputBuffer.java | 23 +- .../cassandra/io/util/DataOutputByteBuffer.java | 59 +++ .../cassandra/io/util/DataOutputPlus.java | 32 ++ .../io/util/DataOutputStreamAndChannel.java | 55 +++ .../cassandra/io/util/DataOutputStreamPlus.java | 57 +++
[09/16] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dd276ebb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dd276ebb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dd276ebb Branch: refs/heads/cassandra-2.1 Commit: dd276ebb5dc96fbc487c4cde1ff8b5f9d3a019a4 Parents: c80f61b 73a3eeb Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:11:02 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:11:02 2014 -0500 -- interface/cassandra.thrift | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd276ebb/interface/cassandra.thrift --
[jira] [Commented] (CASSANDRA-6506) counters++ split counter context shards into separate cells
[ https://issues.apache.org/jira/browse/CASSANDRA-6506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940695#comment-13940695 ] Aleksey Yeschenko commented on CASSANDRA-6506: -- Once we have CASSANDRA-6717, I pinky-promise to get rid of most of the stuff that's bothering you in 3.0 (all new CellName methods, originalType() and enableCounters()). (I can kill the new CellName methods right now, really). I honestly have no clue wrt getting rid of local and remote shards, which is why I'm fine with this current approach in general. I would love to, really, to just stick to maps, but I just don't see how we can get rid of those. counters++ split counter context shards into separate cells --- Key: CASSANDRA-6506 URL: https://issues.apache.org/jira/browse/CASSANDRA-6506 Project: Cassandra Issue Type: Improvement Reporter: Aleksey Yeschenko Assignee: Aleksey Yeschenko Fix For: 2.1 beta2 This change is related to, but somewhat orthogonal to CASSANDRA-6504. Currently all the shard tuples for a given counter cell are packed, in sorted order, in one binary blob. Thus reconciling N counter cells requires allocating a new byte buffer capable of holding the union of the two context's shards N-1 times. For writes, in post CASSANDRA-6504 world, it also means reading more data than we have to (the complete context, when all we need is the local node's global shard). Splitting the context into separate cells, one cell per shard, will help to improve this. We did a similar thing with super columns for CASSANDRA-3237. Incidentally, doing this split is now possible thanks to CASSANDRA-3237. Doing this would also simplify counter reconciliation logic. Getting rid of old contexts altogether can be done trivially with upgradesstables. In fact, we should be able to put the logical clock into the cell's timestamp, and use regular Cell-s and regular Cell reconcile() logic for the shards, especially once we get rid of the local/remote shards some time in the future (until then we still have to differentiate between global/remote/local shards and their priority rules). -- This message was sent by Atlassian JIRA (v6.2#6252)
[1/4] git commit: Add UNLOGGED, COUNTER options to BATCH docs
Repository: cassandra Updated Branches: refs/heads/trunk 96b55cecc - 00317fc8f Add UNLOGGED, COUNTER options to BATCH docs patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-6816 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7e870018 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7e870018 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7e870018 Branch: refs/heads/trunk Commit: 7e870018dc2b1b78cf1754056c260c77379d5b47 Parents: 3008532 Author: Tyler Hobbs ty...@datastax.com Authored: Wed Mar 19 11:37:09 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Wed Mar 19 11:37:09 2014 -0500 -- CHANGES.txt | 1 + doc/cql3/CQL.textile | 19 +++ 2 files changed, 16 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index f88345d..960b0e9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.2.16 + * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816) * add extra SSL cipher suites (CASSANDRA-6613) * fix nodetool getsstables for blob PK (CASSANDRA-6803) * Add CMSClassUnloadingEnabled JVM option (CASSANDRA-6541) http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/doc/cql3/CQL.textile -- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index ecd3b7e..91e2625 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -536,7 +536,7 @@ h3(#batchStmt). BATCH __Syntax:__ bc(syntax).. -batch-stmt ::= BEGIN BATCH +batch-stmt ::= BEGIN ( UNLOGGED | COUNTER ) BATCH ( USING option ( AND option )* )? modification-stmt ( ';' modification-stmt )* APPLY BATCH @@ -557,11 +557,22 @@ BEGIN BATCH DELETE name FROM users WHERE userid = 'user1'; APPLY BATCH; -The @BATCH@ statement group multiple modification statements (insertions/updates and deletions) into a single statement. It mainly serves two purposes: -# it saves network round-trips between the client and the server (and sometimes between the server coordinator and the replicas) when batching multiple updates. -# all updates in a @BATCH@ belonging to a given partition key are performed atomically and in isolation +The @BATCH@ statement group multiple modification statements (insertions/updates and deletions) into a single statement. It serves several purposes: +# It saves network round-trips between the client and the server (and sometimes between the server coordinator and the replicas) when batching multiple updates. +# All updates in a @BATCH@ belonging to a given partition key are performed in isolation. +# By default, all operations in the batch are performed atomically. See the notes on @UNLOGGED@:#unloggedBatch for more details. Note however that the @BATCH@ statement only allows @UPDATE@, @INSERT@ and @DELETE@ statements and is _not_ a full analogue for SQL transactions. +h4(#unloggedBatch). @UNLOGGED@ + +By default, Cassandra uses a batch log to ensure all operations in a batch are applied atomically. (Note that the operations are still only isolated within a single partition.) + +There is a performance penalty for batch atomicity when a batch spans multiple partitions. If you do not want to incur this penalty, you can tell Cassandra to skip the batchlog with the @UNLOGGED@ option. If the @UNLOGGED@ option is used, operations are only atomic within a single partition. + +h4(#counterBatch). @COUNTER@ + +Use the @COUNTER@ option for batched counter updates. Unlike other updates in Cassandra, counter updates are not idempotent. + h4(#batchOptions). @option@ @BATCH@ supports both the @TIMESTAMP@ option, with similar semantic to the one described in the @UPDATE@:#updateOptions statement (the timestamp applies to all the statement inside the batch). However, if used, @TIMESTAMP@ *must not* be used in the statements within the batch.
[14/16] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.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/6e366e3b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6e366e3b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6e366e3b Branch: refs/heads/cassandra-2.1 Commit: 6e366e3b260615df05eea8bc5533f719df8343fe Parents: 350657c dd276eb Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:11:59 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:11:59 2014 -0500 -- interface/cassandra.thrift | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e366e3b/interface/cassandra.thrift --
[11/16] git commit: Merge remote-tracking branch 'origin/cassandra-2.1' into cassandra-2.1
Merge remote-tracking branch 'origin/cassandra-2.1' 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/350657c6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/350657c6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/350657c6 Branch: refs/heads/trunk Commit: 350657c64d4caee378ec310b1b19fb1e7427b9ef Parents: 9ef3eee 75508ec Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:11:12 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:11:12 2014 -0500 -- CHANGES.txt | 5 +- doc/cql3/CQL.textile| 19 +- .../apache/cassandra/cache/AutoSavingCache.java | 3 +- .../cache/SerializingCacheProvider.java | 4 +- .../apache/cassandra/db/BatchlogManager.java| 12 +- .../cassandra/db/ColumnFamilySerializer.java| 7 +- .../org/apache/cassandra/db/ColumnIndex.java| 6 +- .../apache/cassandra/db/ColumnSerializer.java | 4 +- .../apache/cassandra/db/CounterMutation.java| 3 +- .../org/apache/cassandra/db/DeletionInfo.java | 4 +- .../org/apache/cassandra/db/DeletionTime.java | 4 +- src/java/org/apache/cassandra/db/Mutation.java | 4 +- .../org/apache/cassandra/db/OnDiskAtom.java | 3 +- .../apache/cassandra/db/PagedRangeCommand.java | 4 +- .../apache/cassandra/db/RangeSliceCommand.java | 4 +- .../apache/cassandra/db/RangeSliceReply.java| 4 +- .../org/apache/cassandra/db/RangeTombstone.java | 5 +- .../apache/cassandra/db/RangeTombstoneList.java | 4 +- .../org/apache/cassandra/db/ReadCommand.java| 4 +- .../org/apache/cassandra/db/ReadResponse.java | 5 +- src/java/org/apache/cassandra/db/Row.java | 3 +- .../org/apache/cassandra/db/RowIndexEntry.java | 4 +- .../org/apache/cassandra/db/RowPosition.java| 4 +- .../cassandra/db/SliceByNamesReadCommand.java | 3 +- .../cassandra/db/SliceFromReadCommand.java | 4 +- .../apache/cassandra/db/SnapshotCommand.java| 4 +- .../apache/cassandra/db/TruncateResponse.java | 4 +- .../org/apache/cassandra/db/Truncation.java | 4 +- .../org/apache/cassandra/db/WriteResponse.java | 4 +- .../cassandra/db/commitlog/CommitLog.java | 8 +- .../cassandra/db/commitlog/ReplayPosition.java | 4 +- .../db/compaction/AbstractCompactedRow.java | 3 +- .../db/compaction/LazilyCompactedRow.java | 3 +- .../cassandra/db/composites/AbstractCType.java | 4 +- .../db/composites/AbstractCellNameType.java | 4 +- .../apache/cassandra/db/filter/ColumnSlice.java | 4 +- .../cassandra/db/filter/IDiskAtomFilter.java| 5 +- .../cassandra/db/filter/NamesQueryFilter.java | 4 +- .../cassandra/db/filter/SliceQueryFilter.java | 4 +- .../apache/cassandra/dht/AbstractBounds.java| 3 +- .../org/apache/cassandra/dht/BootStrapper.java | 4 +- src/java/org/apache/cassandra/dht/Token.java| 4 +- .../org/apache/cassandra/gms/EchoMessage.java | 4 +- .../org/apache/cassandra/gms/EndpointState.java | 3 +- .../org/apache/cassandra/gms/GossipDigest.java | 3 +- .../apache/cassandra/gms/GossipDigestAck.java | 4 +- .../apache/cassandra/gms/GossipDigestAck2.java | 3 +- .../apache/cassandra/gms/GossipDigestSyn.java | 5 +- .../apache/cassandra/gms/HeartBeatState.java| 3 +- .../apache/cassandra/gms/VersionedValue.java| 3 +- .../apache/cassandra/io/ISSTableSerializer.java | 5 +- .../org/apache/cassandra/io/ISerializer.java| 6 +- .../cassandra/io/IVersionedSerializer.java | 6 +- .../io/compress/CompressionMetadata.java| 3 +- .../io/compress/CompressionParameters.java | 4 +- .../cassandra/io/sstable/IndexHelper.java | 3 +- .../cassandra/io/sstable/IndexSummary.java | 7 +- .../cassandra/io/sstable/SSTableReader.java | 4 +- .../cassandra/io/sstable/SSTableWriter.java | 4 +- .../io/sstable/metadata/CompactionMetadata.java | 4 +- .../metadata/IMetadataComponentSerializer.java | 5 +- .../sstable/metadata/IMetadataSerializer.java | 6 +- .../metadata/LegacyMetadataSerializer.java | 3 +- .../io/sstable/metadata/MetadataSerializer.java | 6 +- .../io/sstable/metadata/StatsMetadata.java | 4 +- .../io/sstable/metadata/ValidationMetadata.java | 4 +- .../cassandra/io/util/AbstractDataOutput.java | 43 +- .../io/util/ByteBufferOutputStream.java | 46 -- .../io/util/ChecksummedOutputStream.java| 56 --- .../cassandra/io/util/DataOutputBuffer.java | 23 +- .../cassandra/io/util/DataOutputByteBuffer.java | 59 +++ .../cassandra/io/util/DataOutputPlus.java | 32 ++ .../io/util/DataOutputStreamAndChannel.java | 55 +++ .../cassandra/io/util/DataOutputStreamPlus.java | 57 +++
[jira] [Commented] (CASSANDRA-6783) Collections should have a proper compare() method for UDT
[ https://issues.apache.org/jira/browse/CASSANDRA-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940701#comment-13940701 ] Tyler Hobbs commented on CASSANDRA-6783: +1 with a minor nit: the {{java.util.*}} import is unused in CollectionTypeTest Collections should have a proper compare() method for UDT - Key: CASSANDRA-6783 URL: https://issues.apache.org/jira/browse/CASSANDRA-6783 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Fix For: 2.1 beta2 Attachments: 6783-2.txt, 6783.txt So far, ListType, SetType and MapType don't have a proper implementation of compare() (they throw UnsupportedOperationException) because we haven't need one since as far as the cell comparator is concenred, only parts of a collection ends up in the comparator and need to be compared, but the full collection itself does not. But with UDT can nest a collection and that sometimes require to be able to compare them. Typically, I pushed a dtest [here|https://github.com/riptano/cassandra-dtest/commit/290e9496d1b2c45158c7d7f5487d09ba48897a7f] that ends up throwing: {noformat} java.lang.UnsupportedOperationException: CollectionType should not be use directly as a comparator at org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:72) ~[main/:na] at org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:37) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractType.compareCollectionMembers(AbstractType.java:174) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:101) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:35) ~[main/:na] at java.util.TreeMap.compare(TreeMap.java:1188) ~[na:1.7.0_45] at java.util.TreeMap.put(TreeMap.java:531) ~[na:1.7.0_45] at java.util.TreeSet.add(TreeSet.java:255) ~[na:1.7.0_45] at org.apache.cassandra.cql3.Sets$DelayedValue.bind(Sets.java:205) ~[main/:na] at org.apache.cassandra.cql3.Sets$Literal.prepare(Sets.java:91) ~[main/:na] at org.apache.cassandra.cql3.UserTypes$Literal.prepare(UserTypes.java:60) ~[main/:na] at org.apache.cassandra.cql3.Operation$SetElement.prepare(Operation.java:221) ~[main/:na] at org.apache.cassandra.cql3.statements.UpdateStatement$ParsedUpdate.prepareInternal(UpdateStatement.java:201) ~[main/:na] ... {noformat} Note that this stack doesn't involve cell name comparison at all, it's just that CQL3 sometimes uses a SortedSet underneath to deal with set literals (since internal sets are sorted by their value), and so when a set contains UDT that has set themselves, we need the collection comparison. That being said, for some cases like having a UDT as a map key, we do would need collections to be comparable for the purpose of cell name comparison. Attaching relatively simple patch. The patch is a bit bigger than it should be because while adding the 3 simple compare() method, I realized that we had methods to read a short length (2 unsigned short) from a ByteBuffer duplicated all over the place and that it was time to consolidate that in ByteBufferUtil where it should have been from day one (thus removing the duplication). I can separate that trivial refactor in a separate patch if we really need to, but really, the new stuff is the compare() method implementation in ListType, SetType and MapType and the rest is a bit of trivial cleanup. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6807) Thrift with CQL3 doesn't return key
[ https://issues.apache.org/jira/browse/CASSANDRA-6807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940700#comment-13940700 ] Jonathan Ellis commented on CASSANDRA-6807: --- added a note to the cassandra.thrift IDL instead. thanks! Thrift with CQL3 doesn't return key --- Key: CASSANDRA-6807 URL: https://issues.apache.org/jira/browse/CASSANDRA-6807 Project: Cassandra Issue Type: Improvement Components: Core Environment: windows 7 64bit, jdk 1.7, cassandra 2.0.5 Reporter: Peter Labels: javadoc Fix For: 2.0.7 Attachments: thrift-missing-key.png I'm working on adding support for CQL3 to Hector and came across an odd issue. I explicitly include the key in the statement, but the key isn't returned. I've attached a screenshot. Hector's CqlQuery class is doing the following to issue the cql3 call. I'm hoping it's a simple configuration detail I'm missing or parameter I need to set. result = cassandra.execute_cql3_query(query, useCompression ? Compression.GZIP : Compression.NONE, getConsistency()); Looking at org.apache.cassandra.thrift.Cassandra.Client, I don't see anything obvious that would tell me how to tell Cassandra to return the key in the CqlResult or CqlRow. The queries I tried look like this select key from myColFamily; -- This message was sent by Atlassian JIRA (v6.2#6252)
[01/16] git commit: r/m unused code from ThriftServer/TServerFactory patch by Ed Capriolo; reviewed by jbellis for CASSANDRA-6854
Repository: cassandra Updated Branches: refs/heads/cassandra-1.2 7e870018d - 73a3eeb6f refs/heads/cassandra-2.0 c80f61b68 - dd276ebb5 refs/heads/cassandra-2.1 75508ec89 - 6e366e3b2 refs/heads/trunk 9f057832e - 335aa9f1f r/m unused code from ThriftServer/TServerFactory patch by Ed Capriolo; reviewed by jbellis for CASSANDRA-6854 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9ef3eeec Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9ef3eeec Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9ef3eeec Branch: refs/heads/cassandra-2.1 Commit: 9ef3eeec13b1cd30b35780def9cc35923193dfe9 Parents: a45fea8 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 11:46:20 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 11:46:20 2014 -0500 -- src/java/org/apache/cassandra/thrift/TServerFactory.java | 1 - src/java/org/apache/cassandra/thrift/ThriftServer.java | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9ef3eeec/src/java/org/apache/cassandra/thrift/TServerFactory.java -- diff --git a/src/java/org/apache/cassandra/thrift/TServerFactory.java b/src/java/org/apache/cassandra/thrift/TServerFactory.java index ec3d61b..09014ce 100644 --- a/src/java/org/apache/cassandra/thrift/TServerFactory.java +++ b/src/java/org/apache/cassandra/thrift/TServerFactory.java @@ -33,7 +33,6 @@ public interface TServerFactory { public InetSocketAddress addr; public Integer listenBacklog; -public CassandraServer cassandraServer; public TProcessor processor; public TProtocolFactory tProtocolFactory; public TTransportFactory inTransportFactory; http://git-wip-us.apache.org/repos/asf/cassandra/blob/9ef3eeec/src/java/org/apache/cassandra/thrift/ThriftServer.java -- diff --git a/src/java/org/apache/cassandra/thrift/ThriftServer.java b/src/java/org/apache/cassandra/thrift/ThriftServer.java index d233850..2aef2e3 100644 --- a/src/java/org/apache/cassandra/thrift/ThriftServer.java +++ b/src/java/org/apache/cassandra/thrift/ThriftServer.java @@ -55,7 +55,7 @@ public class ThriftServer implements CassandraDaemon.Server if (server == null) { CassandraServer iface = getCassandraServer(); -server = new ThriftServerThread(address, port, backlog, iface, getProcessor(iface), getTransportFactory()); +server = new ThriftServerThread(address, port, backlog, getProcessor(iface), getTransportFactory()); server.start(); } } @@ -112,7 +112,6 @@ public class ThriftServer implements CassandraDaemon.Server public ThriftServerThread(InetAddress listenAddr, int listenPort, int listenBacklog, - CassandraServer server, TProcessor processor, TTransportFactory transportFactory) { @@ -123,7 +122,6 @@ public class ThriftServer implements CassandraDaemon.Server args.tProtocolFactory = new TBinaryProtocol.Factory(true, true); args.addr = new InetSocketAddress(listenAddr, listenPort); args.listenBacklog = listenBacklog; -args.cassandraServer = server; args.processor = processor; args.keepAlive = DatabaseDescriptor.getRpcKeepAlive(); args.sendBufferSize = DatabaseDescriptor.getRpcSendBufferSize();
[08/16] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dd276ebb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dd276ebb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dd276ebb Branch: refs/heads/trunk Commit: dd276ebb5dc96fbc487c4cde1ff8b5f9d3a019a4 Parents: c80f61b 73a3eeb Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:11:02 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:11:02 2014 -0500 -- interface/cassandra.thrift | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd276ebb/interface/cassandra.thrift --
[10/16] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Merge branch 'cassandra-1.2' into cassandra-2.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/dd276ebb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/dd276ebb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/dd276ebb Branch: refs/heads/cassandra-2.0 Commit: dd276ebb5dc96fbc487c4cde1ff8b5f9d3a019a4 Parents: c80f61b 73a3eeb Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:11:02 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:11:02 2014 -0500 -- interface/cassandra.thrift | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd276ebb/interface/cassandra.thrift --
[jira] [Commented] (CASSANDRA-6506) counters++ split counter context shards into separate cells
[ https://issues.apache.org/jira/browse/CASSANDRA-6506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940736#comment-13940736 ] Sylvain Lebresne commented on CASSANDRA-6506: - bq. With CASSANDRA-6717 this should become a non-issue, but that's 3.0 Well, that's one more reason why rushing this in 2.1 is possibly not the best option. But truly, I'm not sure we absolutely need CASSANDRA-6717 for this if we really don't want to. It's simple enough to have a boolean flag to distinguish between dense and non-dense in 2.1 if we really want to. Even if that flag get replaced by something else in CASSANDRA-6717, that's still feel cleaner to me that having specific CellNameType implementation, originalType(), etc... bq. (see the last set two sets of graphs in CASSANDRA-6553, where 6556 writes are a lot smoother than writes w/out them). That and getting rid of CASSANDRA-6405 for good. Fair enough, I'm not saying the end goal is wrong. But tbh, it feels like the patch currently add more complexity than it removes, and I'm really bugged about having special cellName and cellNameType implementations for counters. We also already have done lots of changes to counter in 2.1, I'm just not sure adding another (definitively-not-small) layer of changes on top of that a short time before release is the best strategy to minimize the change of breaking things. Let's say that my gut feeling is that we leave that for 3.0, and use that opportunity to try to simplify that further (CASSANDRA-6717, maybe getting rid of local/remote). bq. but I seriously don't see how this could be accomplished I think the first step is CASSANDRA-6888. If we have that, then in 3.0 we can at least detect if there is remaining local/remote shard in the system. If there is, one idea could be to ask (force really) people to run some offline upgrade tool. Or run it for them at startup really. I know it's not ideal but well, this is just to say that it's possible, and this may be worth the effort truly. bq. hence not holding my breath for implementing counters as maps That's not related to the local/remote shards, is it? Seems to me that we could do that even if we still have CounterCell. bq. That's because using the timestamp field for the logical clock breaks the re-adding of previously dropped counter cells Good point, but that's kind of not a detail imo. But now that we do read-modify-write, we could really use the current time for the timestamp can't we? We'd just have to make sure the times assigned by a local node never go back in time, and add +1 here and there, but that's not too hard. This could also help make writeTime() work with counters, which I believe work currently and is broken by this patch. counters++ split counter context shards into separate cells --- Key: CASSANDRA-6506 URL: https://issues.apache.org/jira/browse/CASSANDRA-6506 Project: Cassandra Issue Type: Improvement Reporter: Aleksey Yeschenko Assignee: Aleksey Yeschenko Fix For: 2.1 beta2 This change is related to, but somewhat orthogonal to CASSANDRA-6504. Currently all the shard tuples for a given counter cell are packed, in sorted order, in one binary blob. Thus reconciling N counter cells requires allocating a new byte buffer capable of holding the union of the two context's shards N-1 times. For writes, in post CASSANDRA-6504 world, it also means reading more data than we have to (the complete context, when all we need is the local node's global shard). Splitting the context into separate cells, one cell per shard, will help to improve this. We did a similar thing with super columns for CASSANDRA-3237. Incidentally, doing this split is now possible thanks to CASSANDRA-3237. Doing this would also simplify counter reconciliation logic. Getting rid of old contexts altogether can be done trivially with upgradesstables. In fact, we should be able to put the logical clock into the cell's timestamp, and use regular Cell-s and regular Cell reconcile() logic for the shards, especially once we get rid of the local/remote shards some time in the future (until then we still have to differentiate between global/remote/local shards and their priority rules). -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Assigned] (CASSANDRA-6888) Store whether a counter sstable still use some local/remote shards in the sstable metadata
[ https://issues.apache.org/jira/browse/CASSANDRA-6888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko reassigned CASSANDRA-6888: Assignee: Aleksey Yeschenko Store whether a counter sstable still use some local/remote shards in the sstable metadata -- Key: CASSANDRA-6888 URL: https://issues.apache.org/jira/browse/CASSANDRA-6888 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Assignee: Aleksey Yeschenko Fix For: 2.1 CASSANDRA-6504 has made so we don't distinguish different type of shard in counters. Yet, even though we don't generate those local/remote type of shards, those won't disappear just by running upgradesstable, they need to be compacted away (and even then, they really only disappear if there has been a new update on the counter post-6504). But we want to get rid of those ultimately, since they make things like CASSANDRA-6506 less optimal. Now, even though the final step of that remain to be discussed, the first step is probably to keep track of whether such shard still exist in the system or not. That part is simple, we can just store a boolean in the SSTableMetadata to say whether or not said sstable still has at least one Cell using such old shard type. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Updated] (CASSANDRA-6666) Avoid accumulating tombstones after partial hint replay
[ https://issues.apache.org/jira/browse/CASSANDRA-?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anne Sullivan updated CASSANDRA-: - Attachment: cassandra_system.log.debug.gz Avoid accumulating tombstones after partial hint replay --- Key: CASSANDRA- URL: https://issues.apache.org/jira/browse/CASSANDRA- Project: Cassandra Issue Type: Bug Components: Core Reporter: Jonathan Ellis Assignee: Jonathan Ellis Priority: Minor Labels: hintedhandoff Fix For: 1.2.16, 2.0.6 Attachments: .txt, cassandra_system.log.debug.gz -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6506) counters++ split counter context shards into separate cells
[ https://issues.apache.org/jira/browse/CASSANDRA-6506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940643#comment-13940643 ] Aleksey Yeschenko commented on CASSANDRA-6506: -- bq. I'm also uncomfortable with originalType() (and enableCounters() to some extend). It feels pretty error prone as you need to think hard about whether you you call that first before calling some other method or not. It feels to me that again, we shouldn't need anything special with CellNameType for counters: thrift/CQL should convert things to/from the internal format, but as far as CellName/CellNameType are concerned, we shouldn't need anything special casing at all (I do understand that we probably need to start storing whether the table is dense or not in the system table for thrift to convert things properly, but it's high time we do that anyway). Mostly, they are there indeed to be able to distinguish between the original comparator being CompositeType(UTF8Type) and just UTF8Type, for example. With CASSANDRA-6717 this should become a non-issue, but that's 3.0, and we can always get rid of originalType() and enableCounters() later. bq. Also, tbh, I'm starting to wonder if 2.1 is such a reasonable target for this at this point. Especially given we can't get rid of CounterCell right now (I think we should seriously consider getting rid of local/remote shard for 3.0) this feels like a lot of changes to push at the last minute, and it doesn't felt like it brings so much to the table that it can't wait 3.0. Especially since in 3.0 it might be achievable to get rid of CounterCell once and for all (and we wouldn't have to care about CQL2). Maybe. I wanted this in 2.1 to sweeten the upgrade to new counters by improving performance where we can (see the last set two sets of graphs in CASSANDRA-6553, where 6556 writes are a lot smoother than writes w/out them). That and getting rid of CASSANDRA-6405 for good. Current reconcile code should die, really. bq. I think we should seriously consider getting rid of local/remote shard for 3.0 We should, but I seriously don't see how this could be accomplished - hence not holding my breath for implementing counters as maps, for example. bq. I believe disallowing the drop of columns for CQL3 counter tables is a regression. Not sure why the patch does it tbh. That's because using the timestamp field for the logical clock breaks the re-adding of previously dropped counter cells. counters++ split counter context shards into separate cells --- Key: CASSANDRA-6506 URL: https://issues.apache.org/jira/browse/CASSANDRA-6506 Project: Cassandra Issue Type: Improvement Reporter: Aleksey Yeschenko Assignee: Aleksey Yeschenko Fix For: 2.1 beta2 This change is related to, but somewhat orthogonal to CASSANDRA-6504. Currently all the shard tuples for a given counter cell are packed, in sorted order, in one binary blob. Thus reconciling N counter cells requires allocating a new byte buffer capable of holding the union of the two context's shards N-1 times. For writes, in post CASSANDRA-6504 world, it also means reading more data than we have to (the complete context, when all we need is the local node's global shard). Splitting the context into separate cells, one cell per shard, will help to improve this. We did a similar thing with super columns for CASSANDRA-3237. Incidentally, doing this split is now possible thanks to CASSANDRA-3237. Doing this would also simplify counter reconciliation logic. Getting rid of old contexts altogether can be done trivially with upgradesstables. In fact, we should be able to put the logical clock into the cell's timestamp, and use regular Cell-s and regular Cell reconcile() logic for the shards, especially once we get rid of the local/remote shards some time in the future (until then we still have to differentiate between global/remote/local shards and their priority rules). -- This message was sent by Atlassian JIRA (v6.2#6252)
[07/16] git commit: comment CqlRow for #6807
comment CqlRow for #6807 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/73a3eeb6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/73a3eeb6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/73a3eeb6 Branch: refs/heads/cassandra-1.2 Commit: 73a3eeb6f679adeb6982229ad730437177a0430d Parents: 7e87001 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:10:52 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:10:52 2014 -0500 -- interface/cassandra.thrift | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a3eeb6/interface/cassandra.thrift -- diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift index 1fc7201..4eda4f8 100644 --- a/interface/cassandra.thrift +++ b/interface/cassandra.thrift @@ -496,7 +496,14 @@ enum CqlResultType { INT = 3 } -/** Row returned from a CQL query */ +/** + Row returned from a CQL query. + + This struct is used for both CQL2 and CQL3 queries. For CQL2, the partition key + is special-cased and is always returned. For CQL3, it is not special cased; + it will be included in the columns list if it was included in the SELECT and + the key field is always null. +*/ struct CqlRow { 1: required binary key, 2: required listColumn columns
[15/16] git commit: Merge remote-tracking branch 'origin/trunk' into trunk
Merge remote-tracking branch 'origin/trunk' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e13b11d4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e13b11d4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e13b11d4 Branch: refs/heads/trunk Commit: e13b11d46d7ae836a039bff5fb8cdb650d9dcb94 Parents: f0227a6 9f05783 Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:12:06 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:12:06 2014 -0500 -- CHANGES.txt | 5 +- doc/cql3/CQL.textile| 19 +- .../apache/cassandra/cache/AutoSavingCache.java | 3 +- .../cache/SerializingCacheProvider.java | 4 +- .../apache/cassandra/db/BatchlogManager.java| 12 +- .../cassandra/db/ColumnFamilySerializer.java| 7 +- .../org/apache/cassandra/db/ColumnIndex.java| 6 +- .../apache/cassandra/db/ColumnSerializer.java | 4 +- .../apache/cassandra/db/CounterMutation.java| 3 +- .../org/apache/cassandra/db/DeletionInfo.java | 4 +- .../org/apache/cassandra/db/DeletionTime.java | 4 +- src/java/org/apache/cassandra/db/Mutation.java | 4 +- .../org/apache/cassandra/db/OnDiskAtom.java | 3 +- .../apache/cassandra/db/PagedRangeCommand.java | 4 +- .../apache/cassandra/db/RangeSliceCommand.java | 4 +- .../apache/cassandra/db/RangeSliceReply.java| 4 +- .../org/apache/cassandra/db/RangeTombstone.java | 5 +- .../apache/cassandra/db/RangeTombstoneList.java | 4 +- .../org/apache/cassandra/db/ReadCommand.java| 4 +- .../org/apache/cassandra/db/ReadResponse.java | 5 +- src/java/org/apache/cassandra/db/Row.java | 3 +- .../org/apache/cassandra/db/RowIndexEntry.java | 4 +- .../org/apache/cassandra/db/RowPosition.java| 4 +- .../cassandra/db/SliceByNamesReadCommand.java | 3 +- .../cassandra/db/SliceFromReadCommand.java | 4 +- .../apache/cassandra/db/SnapshotCommand.java| 4 +- .../apache/cassandra/db/TruncateResponse.java | 4 +- .../org/apache/cassandra/db/Truncation.java | 4 +- .../org/apache/cassandra/db/WriteResponse.java | 4 +- .../cassandra/db/commitlog/CommitLog.java | 8 +- .../cassandra/db/commitlog/ReplayPosition.java | 4 +- .../db/compaction/AbstractCompactedRow.java | 3 +- .../db/compaction/LazilyCompactedRow.java | 3 +- .../cassandra/db/composites/AbstractCType.java | 4 +- .../db/composites/AbstractCellNameType.java | 4 +- .../apache/cassandra/db/filter/ColumnSlice.java | 4 +- .../cassandra/db/filter/IDiskAtomFilter.java| 5 +- .../cassandra/db/filter/NamesQueryFilter.java | 4 +- .../cassandra/db/filter/SliceQueryFilter.java | 4 +- .../apache/cassandra/dht/AbstractBounds.java| 3 +- .../org/apache/cassandra/dht/BootStrapper.java | 4 +- src/java/org/apache/cassandra/dht/Token.java| 4 +- .../org/apache/cassandra/gms/EchoMessage.java | 4 +- .../org/apache/cassandra/gms/EndpointState.java | 3 +- .../org/apache/cassandra/gms/GossipDigest.java | 3 +- .../apache/cassandra/gms/GossipDigestAck.java | 4 +- .../apache/cassandra/gms/GossipDigestAck2.java | 3 +- .../apache/cassandra/gms/GossipDigestSyn.java | 5 +- .../apache/cassandra/gms/HeartBeatState.java| 3 +- .../apache/cassandra/gms/VersionedValue.java| 3 +- .../apache/cassandra/io/ISSTableSerializer.java | 5 +- .../org/apache/cassandra/io/ISerializer.java| 6 +- .../cassandra/io/IVersionedSerializer.java | 6 +- .../io/compress/CompressionMetadata.java| 3 +- .../io/compress/CompressionParameters.java | 4 +- .../cassandra/io/sstable/IndexHelper.java | 3 +- .../cassandra/io/sstable/IndexSummary.java | 7 +- .../cassandra/io/sstable/SSTableReader.java | 4 +- .../cassandra/io/sstable/SSTableWriter.java | 4 +- .../io/sstable/metadata/CompactionMetadata.java | 4 +- .../metadata/IMetadataComponentSerializer.java | 5 +- .../sstable/metadata/IMetadataSerializer.java | 6 +- .../metadata/LegacyMetadataSerializer.java | 3 +- .../io/sstable/metadata/MetadataSerializer.java | 6 +- .../io/sstable/metadata/StatsMetadata.java | 4 +- .../io/sstable/metadata/ValidationMetadata.java | 4 +- .../cassandra/io/util/AbstractDataOutput.java | 43 +- .../io/util/ByteBufferOutputStream.java | 46 -- .../io/util/ChecksummedOutputStream.java| 56 --- .../cassandra/io/util/DataOutputBuffer.java | 23 +- .../cassandra/io/util/DataOutputByteBuffer.java | 59 +++ .../cassandra/io/util/DataOutputPlus.java | 32 ++ .../io/util/DataOutputStreamAndChannel.java | 55 +++ .../cassandra/io/util/DataOutputStreamPlus.java | 57 +++
[jira] [Commented] (CASSANDRA-6854) TServerArgs have unsed reference
[ https://issues.apache.org/jira/browse/CASSANDRA-6854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940653#comment-13940653 ] Jonathan Ellis commented on CASSANDRA-6854: --- LGTM, committed TServerArgs have unsed reference Key: CASSANDRA-6854 URL: https://issues.apache.org/jira/browse/CASSANDRA-6854 Project: Cassandra Issue Type: Improvement Reporter: Edward Capriolo Assignee: Edward Capriolo Priority: Minor Fix For: 2.1 beta2 Attachments: args_reference_unused.diff, cassandra-6870.1.patch The TServer.Args class has a member far CassandraServer ref. This reference is unneeded because the Factory works off Protocol -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6666) Avoid accumulating tombstones after partial hint replay
[ https://issues.apache.org/jira/browse/CASSANDRA-?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940757#comment-13940757 ] Anne Sullivan commented on CASSANDRA-: -- Attached debug logs (cassandra_system.log.debug.gz) - two node cluster, RF=2 (node A / node B) - bring node B down for 30 minutes, back online @ 2014-03-19 10:15:00 - hinted handoff starts @ 2014-03-19 10:18:00 - hinted handoff finishes successfully @ 2014-03-19 10:59:04: INFO [HintedHandoff:1] 2014-03-19 10:59:04,434 HintedHandOffManager.java (line 378) Finished hinted handoff of 1903040 rows to endpoint /###.###.###.### - @ 2014-03-19 10:59:16,428 user defined compaction compacts down to one sstable (expected result = no sstables / empty set): INFO [CompactionExecutor:3421] 2014-03-19 10:59:16,428 CompactionTask.java (line 275) Compacted 4 sstables to [/path/to/db/data/system/hints/system-hints-jb-49,]. 172,043,512 bytes to 6,365,114 (~3% of original) in 11,991ms = 0.506233MB/s. 4 total partitions merged to 1. Partition merge counts were {4:1, } - @ 2014-03-19 11:08:08 another hinted handoff starts (presumably because the hints table isn't empty, and it's checking every 10 minutes) and reports 0 live cells: WARN [HintedHandoff:2] 2014-03-19 11:08:08,639 SliceQueryFilter.java (line 210) Read 0 live and 75750 tombstoned cells in system.hints (see tombstone_warn_threshold) INFO [HintedHandoff:2] 2014-03-19 11:08:08,639 HintedHandOffManager.java (line 378) Finished hinted handoff of 0 rows to endpoint /###.###.###.### - user defined compaction again leaves behind a single sstable: INFO [CompactionExecutor:3438] 2014-03-19 11:08:08,963 CompactionTask.java (line 275) Compacted 1 sstables to [/path/to/db/data/system/hints/system-hints-jb-50,]. 6,365,114 bytes to 6,365,114 (~100% of original) in 322ms = 18.851695MB/s. 1 total partitions merged to 1. Partition merge counts were {1:1, } Partial output from running cqlsh describe keyspace system, to confirm that gc_grace_seconds=0, so expecting tombstones to be removed on compaction: CREATE TABLE hints ( target_id uuid, hint_id timeuuid, message_version int, mutation blob, PRIMARY KEY (target_id, hint_id, message_version) ) WITH COMPACT STORAGE AND bloom_filter_fp_chance=0.01 AND caching='KEYS_ONLY' AND comment='hints awaiting delivery' AND dclocal_read_repair_chance=0.00 AND gc_grace_seconds=0 AND index_interval=128 AND read_repair_chance=0.00 AND replicate_on_write='true' AND populate_io_cache_on_flush='false' AND default_time_to_live=0 AND speculative_retry='99.0PERCENTILE' AND memtable_flush_period_in_ms=360 AND compaction={'enabled': 'false', 'class': 'SizeTieredCompactionStrategy'} AND compression={'sstable_compression': 'LZ4Compressor'}; Avoid accumulating tombstones after partial hint replay --- Key: CASSANDRA- URL: https://issues.apache.org/jira/browse/CASSANDRA- Project: Cassandra Issue Type: Bug Components: Core Reporter: Jonathan Ellis Assignee: Jonathan Ellis Priority: Minor Labels: hintedhandoff Fix For: 1.2.16, 2.0.6 Attachments: .txt, cassandra_system.log.debug.gz -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6821) Cassandra can't delete snapshots for keyspaces that no longer exist.
[ https://issues.apache.org/jira/browse/CASSANDRA-6821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940778#comment-13940778 ] Nick Bailey commented on CASSANDRA-6821: It seems like you left some system.out debugging in the patch. Cassandra can't delete snapshots for keyspaces that no longer exist. Key: CASSANDRA-6821 URL: https://issues.apache.org/jira/browse/CASSANDRA-6821 Project: Cassandra Issue Type: Improvement Reporter: Nick Bailey Assignee: Lyuben Todorov Labels: nodetool Fix For: 2.1 beta2 Attachments: trunk-6821.patch If you drop a keyspace you can no longer clean up the snapshots for that keyspace without resorting to the command line. It would be nice to be able clean up those via jmx, especially for external tools. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CASSANDRA-6821) Cassandra can't delete snapshots for keyspaces that no longer exist.
[ https://issues.apache.org/jira/browse/CASSANDRA-6821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13940811#comment-13940811 ] Nick Bailey commented on CASSANDRA-6821: besides that it looks good. Cassandra can't delete snapshots for keyspaces that no longer exist. Key: CASSANDRA-6821 URL: https://issues.apache.org/jira/browse/CASSANDRA-6821 Project: Cassandra Issue Type: Improvement Reporter: Nick Bailey Assignee: Lyuben Todorov Labels: nodetool Fix For: 2.1 beta2 Attachments: trunk-6821.patch If you drop a keyspace you can no longer clean up the snapshots for that keyspace without resorting to the command line. It would be nice to be able clean up those via jmx, especially for external tools. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (CASSANDRA-6889) Add the ability to use a url as the input to the --file parameter of cqlsh
Darla Baker created CASSANDRA-6889: -- Summary: Add the ability to use a url as the input to the --file parameter of cqlsh Key: CASSANDRA-6889 URL: https://issues.apache.org/jira/browse/CASSANDRA-6889 Project: Cassandra Issue Type: Improvement Reporter: Darla Baker Priority: Minor Customer request to use a gist or similar url pointing to a cqlsh script rather than a local file. -- This message was sent by Atlassian JIRA (v6.2#6252)
[13/16] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.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/6e366e3b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6e366e3b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6e366e3b Branch: refs/heads/trunk Commit: 6e366e3b260615df05eea8bc5533f719df8343fe Parents: 350657c dd276eb Author: Jonathan Ellis jbel...@apache.org Authored: Wed Mar 19 12:11:59 2014 -0500 Committer: Jonathan Ellis jbel...@apache.org Committed: Wed Mar 19 12:11:59 2014 -0500 -- interface/cassandra.thrift | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e366e3b/interface/cassandra.thrift --