6

In class DynamoDBMapper.FailedBatch what does Map<String, List<WriteRequest>> unprocessed items contain?

What is the best way to retry this failed batch?

sidgate
  • 14,650
  • 11
  • 68
  • 119
YOUNGPITAJI
  • 65
  • 1
  • 4

1 Answers1

3

The Map<String, List<WriteRequest>> is a map where the key is a table name and the value is a list of WriteRequests for that table that were not completed because there was not enough available write capacity to complete the whole request. It’s DynamoDB’s way of handling partial throttling of a batch request.

What should you do with the UnprocessedItems? From the BatchWriteItem documentation:

If DynamoDB returns any unprocessed items, you should retry the batch operation on those items.

(Just to clarify, you should retry only the unprocessed items, not the whole request.)

For more information, see BatchWriteItem and Batch Operations and Error Handling in the DynamoDB documentation.

Matthew Pope
  • 7,212
  • 1
  • 28
  • 49