You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2016/09/13 08:52:59 UTC

[4/8] cassandra git commit: Don't query more columns than necessary

Don't query more columns than necessary


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/28d4e8e6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/28d4e8e6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/28d4e8e6

Branch: refs/heads/12060-3.0-v2
Commit: 28d4e8e60714b765696fcc3dcd53f09ba59ed1b3
Parents: 724a47a
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Fri Sep 2 10:10:20 2016 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Fri Sep 2 10:10:20 2016 +0200

----------------------------------------------------------------------
 .../org/apache/cassandra/cql3/statements/CQL3CasRequest.java     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/28d4e8e6/src/java/org/apache/cassandra/cql3/statements/CQL3CasRequest.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/CQL3CasRequest.java b/src/java/org/apache/cassandra/cql3/statements/CQL3CasRequest.java
index 5362e8f..f556580 100644
--- a/src/java/org/apache/cassandra/cql3/statements/CQL3CasRequest.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CQL3CasRequest.java
@@ -125,9 +125,7 @@ public class CQL3CasRequest implements CASRequest
         // if an insert only static columns, then the existence condition applies only to the
         // static columns themselves, and so we don't want to include regular columns in that
         // case.
-        // If static row is updated, in order to maintain backward compatibility with 2.x
-        // we have to read at least one row to return failure result with filled clustering.
-        if (hasExists || updatesStaticRow)
+        if (hasExists)
         {
             PartitionColumns allColumns = cfm.partitionColumns();
             Columns statics = updatesStaticRow ? allColumns.statics : Columns.NONE;