cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-7405) Optimize cqlsh COPY TO and COPY FROM
Date Tue, 19 Aug 2014 17:59:19 GMT


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()}}:

if value != nullval:
 elif name in clustering_key_columns and not type.empty_binary_ok:
    rowmap[name] = 'blobAs%s(0x)' % cqltype.title()
    rowmap[name] = 'null'

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:
>             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
> 1. Use proto paging in COPY TO
> 2. Use async writes in COPY FROM

This message was sent by Atlassian JIRA

View raw message