[
https://issues.apache.org/jira/browse/CASSANDRA-7053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975997#comment-13975997
]
Mikhail Stepura commented on CASSANDRA-7053:
--------------------------------------------
Hmm,
I've created a dtest which still fails. It looks like CAS/paxos stuff always
uses server timestamps. [~iamaleksey] is that expected behavior?
{code}
def batch_with_conditions_uses_proper_timestamp_test(self):
""" Test that each statement will be executed with provided BATCH
timestamp """
cursor = self.prepare()
cursor.execute("""
BEGIN BATCH USING TIMESTAMP 1111111111111111
INSERT INTO users (id, firstname, lastname) VALUES (999, 'Jack',
'Sparrow') IF NOT EXISTS
APPLY BATCH
""")
cursor.execute("SELECT id, firstname, lastname, writetime(firstname),
writetime(lastname) FROM users")
res = sorted(cursor.fetchall())
assert res == [[999, u'Jack', u'Sparrow', 1111111111111111,
1111111111111111]], res
{code}
{code:title=failure}
Failure
Traceback (most recent call last):
File
"/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py",
line 331, in run
testMethod()
File "/Users/mikhail/Documents/workspace/cassandra-dtest/batch_test.py", line
179, in batch_with_conditions_uses_proper_timestamp_test
assert res == [[999, u'Jack', u'Sparrow', 1111111111111111,
1111111111111111]], res
AssertionError: [[999, u'Jack', u'Sparrow', 1398111666371000, 1398111666371000]]
{code}
> USING TIMESTAMP for batches does not work
> -----------------------------------------
>
> Key: CASSANDRA-7053
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7053
> Project: Cassandra
> Issue Type: Bug
> Reporter: Robert Supencheck
> Assignee: Mikhail Stepura
> Labels: cqlsh
> Fix For: 2.0.8
>
> Attachments: cassandra-2.0-7053.patch
>
>
> When using the "USING TIMESTAMP <timestamp>" syntax for a batch statement,
> the supplied timestamp is ignored.
--
This message was sent by Atlassian JIRA
(v6.2#6252)