When there is a data on DynamoDB with Enum value that doesn't exist on the class model that is gonna receive the deserialization, the execution process hangs forever.
An exception when deserializing an enum value that doesn't exist.
partitionKey, an Enum with values: A and B and an LSI Instant updatedAt.DynamoDbAsyncIndex using QueryConditional.sortBetween like: val queryConditional = QueryConditional.sortBetween(
Key.builder()
.partitionValue(partitionKey)
.sortValue(updatedAtFrom.toString())
.build(),
Key.builder()
.partitionValue(partitionKey)
.sortValue(updatedAtTo.toString())
.build()
)
myTableIndex.query(
QueryEnhancedRequest
.builder()
.queryConditional(queryConditional)
.build())
The problem is in the deserialization of the enum class that doesn't have a value that is signed to a data on DynamoDB.
For this reason, the process gets running forever.
In my DynamoDB environment, there was a unique record with an old state called INITIALIZED that was replaced for CREATED some days ago.
When the query runs, the data cannot be deserialized in this enum and finally hangs the process forever without any exception or log.
@eheinen how are you mapping the enum field to the DynamoDB table? Can you give a sample code of the Bean or the table schema so I can try to reproduce?
It looks like this issue hasn鈥檛 been active in longer than a week. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it.
@debora-ito Sorry my late answer, so, I build the evidence for you to check. The step by step is in the README:
https://github.com/eheinen/dynamodb-issue
Anything, just ping me.
Let me know if you manage to reproduce the issue, please.
Hi,
We had the same problem here. Is there a solution for this case?
As a solution, here we stop using DynamoDbAsyncIndex, and for do SGI research we use DynamoDbAsyncClient directly, using dynamoDbAsyncClient.query (r) ...
Using DynamoDbAsyncIndex, returns an SdkPublisher, and any problem converting from dynamo, the thread is blocked and does not complete the future.
My implementation is very similar to https://github.com/eheinen/dynamodb-issue, using webflux here too. But the problem is not the webflux, if you implement with pure java, the bug is the same.