aws / aws-sdk

Landing page for the AWS SDKs on GitHub
https://aws.amazon.com/tools/
Other
72 stars 14 forks source link

When timestream writeRecords throws it fails to supply data about the successful records. #511

Closed mipper closed 1 year ago

mipper commented 1 year ago

Describe the bug

When some records in a batch passed to TimestreamWriteClient.writeRecords fail a RejectedRecordsException is thrown. When this occurs there is no mechanism for retrieving data about the records that were successfully written from the batch.

If no records are rejected the WriteRecordsResponse object contains an InjestedRecords object detailing the number of records written and whether they were written to memory of magnetic store:

RecordsIngested(Total=6, MemoryStore=6, MagneticStore=0)

This information should still be available in the face of partial rejection of a batch.

Expected Behavior

If a RejectedRecordsException is thrown a mechanism should exist to retrieve data about the successfully written records just like a write that doesn't have any rejected records.

Current Behavior

There is no way to access details of where the successfully written records from the batch were written,

Reproduction Steps

Just write records with dup dimensions/timestamp to get exception. I can't write code to prove you can't access data about the successfully written records.

Possible Solution

If a RejectedRecordsException is thrown it should include a RecordsIngested object detailing the successfully written records just like a write that doesn't have any rejected records.

Additional Information/Context

No response

AWS Java SDK version used

2.17.203

JDK version used

Lambda runtime=java11

Operating System and version

Lambda runtime=java11

debora-ito commented 1 year ago

@mipper thank you for reaching out.

If a RejectedRecordsException is thrown a mechanism should exist to retrieve data about the successfully written records just like a write that doesn't have any rejected records.

This feels like a feature request to improve the experience of the writeRecords API. I'll pass this along to the service team.

Since this change has a cross-SDK impact, will transfer this to the central aws-sdk repository.

debora-ito commented 1 year ago

@mipper the service team acknowledged the feature request. They don't have a timeline to share for when this would be implemented.

P85441850

I'll go ahead and close this, as there's no action pending on the SDK team. Let us know if you have any other question.

github-actions[bot] commented 1 year ago

This issue is now closed.

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.