-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move set_timestamp out of Query/PreparedStatement #262
Comments
I have issue with set_timestamp. When constructing batch statements and each statement must have timestamp to force correct order of queries. When i do query without USING TIMESTAMP
Then I get invalid end state which resembles timestamp collision - according to scylla documentation When i do query with USING TIMESTAMP: So I am doing something completely wrong, or driver have some bug and set_timestamp() does not set timestamp. |
@krzysztofgal I think our API is a little inconsistent here. What will most likely work for you (please try) is calling |
Thanks for quick reply. I just tried |
Oh wait, if you need multiple timestamp values inside a batch statement, then I think that CQL does not really allow expressing it without using So unless I misunderstand the docs, If I'm right, what we should do in the driver is emitting a warning if somebody set a timestamp via |
@psarna Your explanation looks correct. I don't see anything about per-query timestamps in a batch in the protocol spec either - so, As a side note, I think we should consider separating the timestamp parameter from the Perhaps we should tidy up our interface a little - we should consider doing it along with #354. |
Renaming the issue so that it better describes the current state of this issue, which is:
|
The option to specify timestamp for a single execution only could be included in the trait Executable {
async fn execute(...) { ...}
async fn execute_with_timestamp(...) { ... }
} |
The driver lacks the ability to use client-side timestamps.
While, of course, it is possible to set a custom timestamp for a statement via the CQL
USING TIMESTAMP
clause, the Datastax Java driver also allows to:Statement.setQueryTimestamp()
,Source: https://docs.datastax.com/en/developer/java-driver/4.10/manual/core/query_timestamps/
The text was updated successfully, but these errors were encountered: