You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mi...@apache.org on 2014/04/21 23:55:28 UTC

[2/6] git commit: Use timestamp from the statement instead of "now"

Use timestamp from the statement instead of "now"

patch by Mikhail Stepura; reviewed by Aleksey Yeschenko for CASSANDRA-7053


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

Branch: refs/heads/cassandra-2.1
Commit: 1104653a40c921be2c6fde3fc423173c28720916
Parents: 54bf92f
Author: Mikhail Stepura <mi...@apache.org>
Authored: Thu Apr 17 17:15:52 2014 -0700
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Mon Apr 21 14:51:18 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                       | 1 +
 src/java/org/apache/cassandra/cql3/statements/BatchStatement.java | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1104653a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b976d64..bcbde4a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
 2.0.8
  * Queries on compact tables can return more rows that requested (CASSANDRA-7052)
+ * USING TIMESTAMP for batches does not work (CASSANDRA-7053)
 Merged from 1.2:
  * Fix batchlog to account for CF truncation records (CASSANDRA-6999)
  * Fix CQLSH parsing of functions and BLOB literals (CASSANDRA-7018)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1104653a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
index 799d8ea..7f26341 100644
--- a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java
@@ -117,7 +117,8 @@ public class BatchStatement implements CQLStatement, MeasurableForPreparedCache
         {
             ModificationStatement statement = statements.get(i);
             List<ByteBuffer> statementVariables = variables.getVariablesForStatement(i);
-            addStatementMutations(statement, statementVariables, local, cl, now, mutations);
+            long timestamp = attrs.getTimestamp(now, statementVariables);
+            addStatementMutations(statement, statementVariables, local, cl, timestamp, mutations);
         }
         return unzipMutations(mutations);
     }