You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Jean-Daniel Cryans (JIRA)" <ji...@apache.org> on 2017/07/08 16:07:01 UTC

[jira] [Commented] (KUDU-2061) Java Client Not Honoring setIgnoreAllDuplicateRows When Inserting Duplicate Values

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

Jean-Daniel Cryans commented on KUDU-2061:
------------------------------------------

Hi [~sblack522], sorry for the tardy insert.

One thing that that sample code won't check is if the returned OperationResponse has an error. Duplicate rows won't throw an exception, instead the RowError's Status#isAlreadyPresent() will return true. Maybe the API could be clearer/better documented.

> Java Client Not Honoring setIgnoreAllDuplicateRows When Inserting Duplicate Values
> ----------------------------------------------------------------------------------
>
>                 Key: KUDU-2061
>                 URL: https://issues.apache.org/jira/browse/KUDU-2061
>             Project: Kudu
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 1.3.1, 1.5.0
>            Reporter: Scott Black
>
> Duplicate values on insert are not causing warning/error to be returned when setIgnoreAllDuplicateRows is set to false. This is silently causing data loss.
> Test case. Use the example code from [https://github.com/cloudera/kudu-examples/blob/master/java/java-sample/src/main/java/org/kududb/examples/sample/Sample.java]. Change line 43 to insert an constant. 3 inserts will execute but only a single row with no error is thrown. See KUDU-1563 as it seems all inserts are now ignore inserts.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)