[ 
https://issues.apache.org/jira/browse/CASSANDRA-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13985649#comment-13985649
 ] 

Lyuben Todorov edited comment on CASSANDRA-6572 at 4/30/14 3:55 PM:
--------------------------------------------------------------------

Since queries are logged as their string form, this doesn't accommodate 
prepared statements. One way I think we can log the ps' is to log the string 
query during the prepare phase along with the query's id, e.g. 
{{b7693b50da63a31229b8413754bc72c0 INSERT INTO ks.cf (col1) VALUES ( \? )}} and 
then in {{ExecuteMessage#execute}} the values and the id can be logged again 
later on in the log, then during replay we can match values to the queryString 
by using the id. A better way to do it would be to get access to the 
statementId in QP#executePrepared but I'm not sure whether it's worth changing 
the statement to store it's id. 


was (Author: lyubent):
Since queries are logged as their string form, this doesn't accommodate 
prepared statements. One way I think we can log the ps' is to log the string 
query during the prepare phase along with the query's id, e.g. 
{{b7693b50da63a31229b8413754bc72c0 INSERT INTO ks.cf (col1) VALUES (?) }} and 
then in ExecuteMessage#execute the values and the id can be logged again later 
on in the log, then during replay we can match values to the queryString by 
using the id. A better way to do it would be to get access to the statementId 
in QP#executePrepared but I'm not sure whether it's worth changing the 
statement to store it's id. 

> Workload recording / playback
> -----------------------------
>
>                 Key: CASSANDRA-6572
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6572
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core, Tools
>            Reporter: Jonathan Ellis
>            Assignee: Lyuben Todorov
>             Fix For: 2.1.1
>
>         Attachments: 6572-trunk.diff
>
>
> "Write sample mode" gets us part way to testing new versions against a real 
> world workload, but we need an easy way to test the query side as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to