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

Sylvain Lebresne commented on CASSANDRA-11474:
----------------------------------------------

I haven't looked carefully at the patch as I'm not too familiar with that code 
and I'll let somewhat more familiar review.

But I'll note for the record that it's imo wrong that 
{{batch_size_fail_threshold_in_kb}} doesn't apply to {{INSERT}} too (I've 
created CASSANDRA-11522 for the details) and that {{COPY FROM}} shouldn't be in 
the business of avoiding server protections: If the user configures his server 
so that inserts above a certain size are rejected, then an import that violates 
that threshold _should_ fail.

With that said, it kind of make sense I suppose to avoid batches when we don't 
have to on principle so I don't object to this patch in practice, I just 
disagree with the justification (and thus think this is pretty minor in 
practice).


> cqlsh: COPY FROM should use regular inserts for single statement batches
> ------------------------------------------------------------------------
>
>                 Key: CASSANDRA-11474
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11474
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Stefania
>            Assignee: Stefania
>              Labels: lhf
>             Fix For: 2.2.x, 3.0.x, 3.x
>
>
> I haven't reproduced it with a test yet but, from code inspection, if CQL 
> rows are larger than {{batch_size_fail_threshold_in_kb}} and this parameter 
> cannot be changed, then data import will fail.
> Users can control the batch size by setting MAXBATCHSIZE.
> If a batch contains a single statement, there is no need to use a batch and 
> we should use normal inserts instead or, alternatively, we should skip the 
> batch size check for unlogged batches with only one statement.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to