Re: „Using Timestamp“ Feature
When using client supplied timestamps you need to ensure the clock on the client is in sync with the nodes in the cluster otherwise behaviour will be unpredictable. On Thu, 18 Feb 2016 at 08:50 Tyler Hobbs <ty...@datastax.com> wrote: > 2016-02-18 2:00 GMT-06:00 Matthias Niehoff < > matthias.nieh...@codecentric.de>: > >> >> * is the 'using timestamp' feature (and providing statement timestamps) >> sufficiently robust and mature to build an application on? >> > > Yes. It's been there since the start of CQL3. > > >> * In a BatchedStatement, can different statements have different >> (explicitly provided) timestamps, or is the BatchedStatement's timestamp >> used for them all? Is this specified / stable behaviour? >> > > Yes, you can separate timestamps per statement. And, in fact, if you > potentially mix inserts and deletes on the same rows, you *should *use > explicit timestamps with different values. See the timestamp notes here: > http://cassandra.apache.org/doc/cql3/CQL.html#batchStmt > > >> * cqhsh reports a syntax error when I use 'using timestamp' with an >> update statement (works with 'insert'). Is there a good reason for this, or >> is it a bug? >> > > The "USING TIMESTAMP" goes in a different place in update statements. It > should be something like: > > UPDATE mytable USING TIMESTAMP ? SET col = ? WHERE key = ? > > > -- > Tyler Hobbs > DataStax <http://datastax.com/> > -- Ben Bromhead CTO | Instaclustr <https://www.instaclustr.com/> +1 650 284 9692 Managed Cassandra / Spark on AWS, Azure and Softlayer
Re: „Using Timestamp“ Feature
2016-02-18 2:00 GMT-06:00 Matthias Niehoff <matthias.nieh...@codecentric.de> : > > * is the 'using timestamp' feature (and providing statement timestamps) > sufficiently robust and mature to build an application on? > Yes. It's been there since the start of CQL3. > * In a BatchedStatement, can different statements have different > (explicitly provided) timestamps, or is the BatchedStatement's timestamp > used for them all? Is this specified / stable behaviour? > Yes, you can separate timestamps per statement. And, in fact, if you potentially mix inserts and deletes on the same rows, you *should *use explicit timestamps with different values. See the timestamp notes here: http://cassandra.apache.org/doc/cql3/CQL.html#batchStmt > * cqhsh reports a syntax error when I use 'using timestamp' with an update > statement (works with 'insert'). Is there a good reason for this, or is it > a bug? > The "USING TIMESTAMP" goes in a different place in update statements. It should be something like: UPDATE mytable USING TIMESTAMP ? SET col = ? WHERE key = ? -- Tyler Hobbs DataStax <http://datastax.com/>
„Using Timestamp“ Feature
Hi, I have a few questions regarding the „Using timestamp“ feature. I would be glad if you can help me. * is the 'using timestamp' feature (and providing statement timestamps) sufficiently robust and mature to build an application on? * In a BatchedStatement, can different statements have different (explicitly provided) timestamps, or is the BatchedStatement's timestamp used for them all? Is this specified / stable behaviour? * cqhsh reports a syntax error when I use 'using timestamp' with an update statement (works with 'insert'). Is there a good reason for this, or is it a bug? Thank You -- Matthias Niehoff | IT-Consultant | Agile Software Factory | Consulting codecentric AG | Zeppelinstr 2 | 76185 Karlsruhe | Deutschland tel: +49 (0) 721.9595-681 | fax: +49 (0) 721.9595-666 | mobil: +49 (0) 172.1702676 www.codecentric.de | blog.codecentric.de | www.meettheexperts.de | www.more4fi.de Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz Diese E-Mail einschließlich evtl. beigefügter Dateien enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und löschen Sie diese E-Mail und evtl. beigefügter Dateien umgehend. Das unerlaubte Kopieren, Nutzen oder Öffnen evtl. beigefügter Dateien sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet