[ 
https://issues.apache.org/jira/browse/BEAM-10706?focusedWorklogId=510713&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-510713
 ]

ASF GitHub Bot logged work on BEAM-10706:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Nov/20 10:23
            Start Date: 12/Nov/20 10:23
    Worklog Time Spent: 10m 
      Work Description: dennisylyung commented on pull request #12583:
URL: https://github.com/apache/beam/pull/12583#issuecomment-725986759


   @iemejia I made some changes to use a hashmap for deduplication, and to 
improve the test. 
   I separated the test for duplicate key, and used mockito to check whether 
the call to the aws client contains duplicate key. 
   However, as you have worried, each element is put into a single bundle. 
Hence each bundle consist of one element only, defeating the duplication test.
   I looked at the documentation of `DoFnTester` but it is deprecated. The docs 
suggests using `TestPipeline` instead, but I couldn't find anyway to control 
the bundling of elements. 
   Any idea?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 510713)
    Time Spent: 2h 10m  (was: 2h)

> DynamoDBIO fail to write to the same key in short consecution
> -------------------------------------------------------------
>
>                 Key: BEAM-10706
>                 URL: https://issues.apache.org/jira/browse/BEAM-10706
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-aws
>    Affects Versions: 2.23.0
>            Reporter: Dennis Yung
>            Priority: P2
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Internally, DynamoDBIO.Write uses the batchWriteItem method from the AWS SDK 
> to sink items. However, there is a limitation in the AWS SDK that a call to 
> batchWriteItem cannot contain duplicate keys.
> Currently DynamoDBIO.Write performs no key deduplication before flushing a 
> batch, which could cause ValidationException: Provided list of item keys 
> contains duplicates, if consecutive updates to a single key is within the 
> batch size (currently hardcoded to be 25). 
> To fix this bug, the batch of write requests need to be deduplicated before 
> being sent to batchRequest.addRequestItemsEntry



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to