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
preguntada hace 2 años117 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas