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

Benedict commented on CASSANDRA-6572:
-------------------------------------

[~lyubent] a few comments/suggestions about the patch:

# In the query recorder, it would make most sense to keep a writer handle open, 
instead of re-opening the file every time you append a new query. Ideally, we 
would probably have a buffer of some kind we write to in-memory, that we swap 
when we have flush to disk so that other queries can continue to log to the 
buffer without being impeded by the flush.
# It's quite wasteful to convert the query string to base64 encoded bytes, and 
then to convert that back into a string. Should write the bytes straight into 
the new buffer
# Since you're using an AtomicInteger, there's no need to use a lock there: can 
simply increment the counter and check the result (modulo frequency) to see if 
we should log. No need to reset to zero.


> 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.0.8
>
>         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