Skip to content

Enum deserialization is suspending the process forever when the enum value is not existent in the enum class. #1991

Closed
@eheinen

Description

@eheinen

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 and B and an LSI Instant updatedAt.
  • Make an index query with 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())

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-reproductionThis issue needs reproduction.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions