Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamoDbEnhancedClient allow to request to return capacity on all data plane operations #4123

Open
1 of 2 tasks
arjanschaaf opened this issue Jun 21, 2023 · 6 comments
Open
1 of 2 tasks
Labels
dynamodb-enhanced feature-request A feature should be added or improved. p2 This is a standard priority issue

Comments

@arjanschaaf
Copy link

Describe the feature

#2095 added ReturnConsumedCapacity for putItem, updateItem and deleteItem operations, but other Data plane operations should allow you to request to return consumed capacity as offered by the DynamoDB API on their (paged) return.

This should include the following Data plane operations:

  • DynamoDbEnhancedClient.batchGetItem
  • DynamoDbEnhancedClient.batchWriteItem
  • DynamoDbEnhancedClient.transactGetItems
  • DynamoDbEnhancedClient.transactWriteItems
  • DynamoDbTable.getitem
  • DynamoDbTable.query
  • DynamoDbTable.scan

Use Case

Common scenario is to request to the DynamoDB API to return the consumed capacity to log or debug the read or write capacity used by the data plane operation.

Proposed Solution

Continue by adding functionality introduced in #2095 by either adding *WithResponse methods to these classes or extend the existing response objects to include the consumed capacity.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2.20.88

JDK version used

OpenJDK Runtime Environment Corretto-20.0.1.9.1 (build 20.0.1+9-FR)

Operating System and version

macOS Ventura 13.4

@arjanschaaf arjanschaaf added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 21, 2023
@debora-ito
Copy link
Member

That's fair, feature request acknowledged.

Community note: please show your support by adding a 👍 to the original description above to help us prioritize this request.

@debora-ito debora-ito removed the needs-triage This issue or PR still needs to be triaged. label Jul 24, 2023
@debora-ito debora-ito self-assigned this Jul 24, 2023
@debora-ito debora-ito added the p2 This is a standard priority issue label Jul 24, 2023
@debora-ito debora-ito removed their assignment Jul 25, 2023
@debora-ito
Copy link
Member

Quick update:

ReturnConsumedCapacity is now supported by :

  • GetItem (and TransactGetItems as a consequence), as part of version 2.20.146 (via #4375)
  • BatchGetItem, as part of 2.20.147 (via #4421)

@debora-ito
Copy link
Member

Query and Scan now support ConsumedCapacity too, since version 2.20.153 (via #4444).

@prateek-vats
Copy link
Contributor

Query and Scan now support ConsumedCapacity too, since version 2.20.153 (via #4444).

Hi @debora-ito - Any plans on supporting BatchWriteItem and TransactWriteItem in the future?

@prateek-vats
Copy link
Contributor

Query and Scan now support ConsumedCapacity too, since version 2.20.153 (via #4444).

Hi @debora-ito - Any plans on supporting BatchWriteItem and TransactWriteItem in the future?

I can take a stab at it, if this has not been implemented yet

@prateek-vats
Copy link
Contributor

prateek-vats commented Aug 3, 2024

Here's a PR for supporting ConsumedCapacity in BatchWriteItems and TransactWriteItems
#5462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamodb-enhanced feature-request A feature should be added or improved. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants