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

Yingchun Lai commented on KUDU-2889:
------------------------------------

[~oclarms] , yes we can, but these threshold on server side and client side may 
be different, and in case of old client (without validation) write on new 
servers, the server side validation should not be removed. So this question 
remains I think.

> Per-row error indication in prepare phase
> -----------------------------------------
>
>                 Key: KUDU-2889
>                 URL: https://issues.apache.org/jira/browse/KUDU-2889
>             Project: Kudu
>          Issue Type: Improvement
>          Components: tserver
>    Affects Versions: 0.10.0
>            Reporter: Yingchun Lai
>            Assignee: Yingchun Lai
>            Priority: Minor
>
> In prepare phase of write path, some row data may have some errors, like 
> missing a non-nullable field value, then the whole batch will fail, even if 
> the other rows have no errors.
> It's a kind of waste, we should take best effect for the batch as how it work 
> in apply phase, partial rows errors should not fail the whole batch operation.
>  
> For example, these code can be improved:
> [https://github.com/apache/kudu/blob/master/src/kudu/common/row_operations.cc#L387]
> {code:java}
>       if (PREDICT_FALSE(!(col.is_nullable() || col.has_write_default()))) {
>       // TODO: change this to return per-row errors. Otherwise if one row in 
> a batch
>       // is missing a field for some reason, the whole batch will fail.
>       return Status::InvalidArgument("No value provided for required column",
>       col.ToString());
>       }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to