Closed
Description
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.
Expected Behavior
An exception when deserializing an enum value that doesn't exist.
Steps to Reproduce
- A document with a String
partitionKey
, an Enum with values:A
andB
and an LSI InstantupdatedAt
. - Make an index query with
DynamoDbAsyncIndex
usingQueryConditional.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())
Issue
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.
Your Environment
- Kotlin: 1.3.72
- Spring Boot: 2.3.1.RELEASE
- Webflux
- dynamodb-enhanced: 2.13.35
- Netty: 4.1.50.Final
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.