DynamoDB: Use ON CONFLICT DO NOTHING clause on INSERT CDC operations#77
DynamoDB: Use ON CONFLICT DO NOTHING clause on INSERT CDC operations#77
ON CONFLICT DO NOTHING clause on INSERT CDC operations#77Conversation
Discussion SummaryQ&A
Do nothing on DuplicateKeyExceptions@wierdvanderhaar already responded:
@hammerhead added:
Overwrite Option@amotl asked:
@hammerhead responded:
|
... to mitigate errors when events are relayed redundantly from retries after partially failed batches on the Lambda processor.
928a99a to
671b47d
Compare
hammerhead
left a comment
There was a problem hiding this comment.
Makes sense I believe, thanks!
|
@amotl Is it possible to log the conflicts? I could imagine that the user would like to know how often it happens and maybe see if there is a pattern. |
|
I don't know if ON CONFLICT DO ... has any means of logging, and how to retrieve it. An alternative would probably be to omit it, and catch the exception in Python code, in order to be able to converge it into a log event. Because CDC operations are not of the same high volume / throughput like full-load operations, it might be acceptable performance-wise. |
I couldn't find DEBUG/TRACE logging in the existing code that could be switched on to facilitate this. |
Thanks for checking, Marios.
@kneth: If you don't have any objections, and considering my other evaluations, let's merge and release this now, and follow up with a more elaborate external implementation later, which will be doing it how other vendors are also doing it. |
|
Hi again. We will integrate and release this update, and will provide a more elaborate implementation later, which is closer to what AWS DMS and others are offering. We will use that ticket to track progress: |
Reason
... to mitigate errors when events are relayed redundantly from retries after partially failed batches on the Lambda processor.
References
DuplicateKeyExceptionafter Lambda is resuming CDC operations cratedb-toolkit#301/cc @kneth, @surister, @hlcianfagna