[
https://issues.apache.org/jira/browse/CASSANDRA-7405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14102550#comment-14102550
]
Tyler Hobbs commented on CASSANDRA-7405:
----------------------------------------
Excellent idea to use the countdown latch (that solves a problem I hadn't
figured out with the python driver).
The only thing that's off is reporting the line number for errors.
In {{handle_error()}}, you're using {{next(self._num_finished)}} for the index,
which is incorrect. I suggest passing {{next_index}} as an errback arg and
using that.
Additionally, if there are multiple problematic lines, later errors may
overwrite earlier errors. I suggest checking that {{self._first_error}} is
None before setting it.
As a side note, it's not part of this patch, but I'm having trouble figuring
out this part of {{create_insert_statement()}}:
{noformat}
if value != nullval:
...
elif name in clustering_key_columns and not type.empty_binary_ok:
rowmap[name] = 'blobAs%s(0x)' % cqltype.title()
else:
rowmap[name] = 'null'
{noformat}
Specifically, why do we handle null values specially for clustering columns?
Also, why do we insert an empty binary when the type _doesn't_ support it? Why
do we insert empty binaries at all instead of nulls (when we have something
that matches nullval)?
> Optimize cqlsh COPY TO and COPY FROM
> ------------------------------------
>
> Key: CASSANDRA-7405
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7405
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Aleksey Yeschenko
> Assignee: Mikhail Stepura
> Fix For: 2.1.1
>
> Attachments: CASSANDRA-2.1-7405.patch
>
>
> Now that we are using native proto via python-driver, we can, and should, at
> the very least:
> 1. Use proto paging in COPY TO
> 2. Use async writes in COPY FROM
--
This message was sent by Atlassian JIRA
(v6.2#6252)