Unexpected rejected record error when inserting into TimeStream

0

We have a Kotlin (JVM) lambda that inserts records into TimeStream using software.amazon.awssdk.services.timestreamwrite.TimestreamWriteClient from Version 2.17.100 of the aws sdk.

It is hosted in us-east-1 as is the TimeStream DB that it accesses.

We sometimes get a RejectedRecordsException exception, here's a sample: "The record timestamp is outside the time range [2022-02-24T18:21:52.301Z, 2022-02-24T23:01:52.301Z) of the memory store. "

For the above record, the lambda attempted to insert the record at 2022-02-24T17:26:52.317-05:00 using that value as its timestamp, which is 2022-02-24T22:26:52:317Z and well within the accepted range.

The record's timestamp is set to the current time of the lambda inserting the record and the lambda is in the same region as the TimeStream DB - so I don't think there are any potential issues with the time stamp being invalid due to improper time zone handling.

The preceding and subsequent requests, i.e. for the above, a request submitted 3 seconds earlier and one submitted 9 seconds later, are all accepted.

Can someone provide an explanation for the above error?

[Update - Problem solve - it was due to a bug in our code, the timestamp was improper formatted when creating the timestream record]

  • I'm having problems editing the question, so I'm adding more information as a comment.

    I noticed that the stack trace for the above exception includes a method called TimeoutExceptionHandlingStage. I'm curious as to whether the real problem is the record timestamp or some other issue that is being mapped weirdly.

Jeff
已提問 2 年前檢視次數 117 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南