Skip to content

Prepared statement cache is not invalidated after UDT changes #905

Description

@dkropachev

Bug

Prepared statements that reference a user-defined type can remain cached after that UDT is altered.

The cache invalidation code compares the changed UDT with prepared statement metadata using full UDT equality. After an ALTER TYPE, result or variable metadata may contain the same keyspace/type name with a different field definition. Because full equality includes the field definitions, the driver can fail to recognize that the prepared statement depends on the changed UDT.

Impact

A prepared statement can continue to be reused even though its referenced UDT schema changed. This is especially visible for statements whose result or variable metadata contains UDTs nested in collections, tuples, or other UDTs.

Expected Behavior

When a UDT changes, cached prepared statements that reference that UDT should be invalidated based on the UDT identity: keyspace and type name.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions