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

Grant Henke commented on KUDU-1563:
-----------------------------------

I am reading through and catching up on this. I think it would definitely be a 
nice feature to have. 

It looks like [~danburkert] also mentioned both the operation level setting and 
the session level setting: 

bq. I think I'm in favor of merging the current patch which introduces an 
INSERT IGNORE operation to ignore constraint violations of type 1 on the server 
side. Additionally, we should strongly consider adding a session-specific 
options to selectively ignore each type of constraint individually. So for 
example, the client could use the INSERT IGNORE operation type if they want to 
selectively ignore some instances of duplicate primary-key constraints, or it 
could call KuduSession::ignoreDuplicatePrimaryKeyViolations to ignore all of 
them for the entire session.

I agree that the intuitive place to define the expected behavior would be on 
the operation. I am not sure if there is a big benefit to having both, but 
having it be session based only seams to reduce the flexibility of what a 
client can do.

 





> Add support for INSERT IGNORE
> -----------------------------
>
>                 Key: KUDU-1563
>                 URL: https://issues.apache.org/jira/browse/KUDU-1563
>             Project: Kudu
>          Issue Type: New Feature
>            Reporter: Dan Burkert
>            Assignee: Brock Noland
>            Priority: Major
>              Labels: newbie
>
> The Java client currently has an [option to ignore duplicate row key errors| 
> https://kudu.apache.org/apidocs/org/kududb/client/AsyncKuduSession.html#setIgnoreAllDuplicateRows-boolean-],
>  which is implemented by filtering the errors on the client side.  If we are 
> going to continue to support this feature (and the consensus seems to be that 
> we probably should), we should promote it to a first class operation type 
> that is handled on the server side.  This would have a modest perf. 
> improvement since less errors are returned, and it would allow INSERT IGNORE 
> ops to be mixed in the same batch as other INSERT, DELETE, UPSERT, etc. ops.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to