[
https://issues.apache.org/jira/browse/CASSANDRA-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14001053#comment-14001053
]
Benedict commented on CASSANDRA-6572:
-------------------------------------
Thanks - some comments on the latest patch:
# QR.queryQueue and QQ.limit should both be final
# Your allocate(String) method and allocate(int) method need to be merged (part
of allocate(int) can be moved into the QQ); allocate(String) needs to know
which QQ it has performed allocate(int) against; as it stands there is a race
where it allocates against one and writes to another. At the start of the loop
you should get the QQ, allocate against it, on failure you attempt to
runFlush() and then immediately loop to the start and try again
# runFlush is still synchronized; you should cas the QQ from the one you know
is full to a new one, and if successful you know you can perform the flush
# I would move the flush itself onto a separate thread still - a TPE with 0
core threads and 1 max should suffice
# There are some races in your initing/swapping of queues; I suggest making the
byte[] final in QQ, allocating it in the constructor, and allocating the first
queue by checking if it is null and cas-ing to a new queue; look at
SlabAllocator for an example of this. Use a ConcurrentLinkedQueue to store any
QQs allocated but failed to cas, and put any finished flushing QQs onto this
CLQ when done so that we quickly reach an equilibrium point. We can then make
them DirectByteBuffers at some point easily as well.
# There's no need to close/reopen your OpOrder once you've made these changes
> 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)