awslabs / amazon-dynamodb-tools

Tools to make effective use of DynamoDB easier.
Apache License 2.0
113 stars 24 forks source link

DynamoDBLocal ReturnConsumedCapacity incorrect for BatchGet and BatchWrite #25

Closed drshriveer closed 10 months ago

drshriveer commented 10 months ago

Hi, apologies for filing an issue here, but I have found no other place to file this bug that makes sense. I'm hoping someone on the AWS team can direct this bug to the right place or otherwise let me know where that place is.

Issue:

I have found two instances where DynamoDBLocal fails to return the correct/expected Consumed Capacity. Both when using BatchAPIs against records that do not exist.

  1. When attempting to delete a single record that does not exist via the BatchWrite API, DDBLocal returns 2.0 consumed capacity units. This should be 1.0, as verified against production DynamoDB as well as using the DeleteItem (non-batch) API.

  2. When attempting to Get a single record that does not exist via the BatchGet API, DDBLocal returns 0.0 consumed capacity units. This should be 0.5 (eventually consistent reads) or 1.0 (strongly consistent reads). Again, I verified this against production DynamoDB and tested DDBLocal via the GetItem API which behaves as expected.

switch180 commented 10 months ago

Hey! We have the same last name. Any connection to the Illinois Shrivers? ha.

I'll send this to our product team to take a look, thanks for the bug report.

switch180 commented 10 months ago

Closed in favor of https://github.com/awslabs/amazon-dynamodb-local-samples/issues/7 as suggested by the DynamoDB service team