You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Edward Ribeiro (JIRA)" <ji...@apache.org> on 2015/01/21 16:00:57 UTC

[jira] [Commented] (CASSANDRA-8652) DROP TABLE should also drop BATCH prepared statements associated to it

    [ https://issues.apache.org/jira/browse/CASSANDRA-8652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14285717#comment-14285717 ] 

Edward Ribeiro commented on CASSANDRA-8652:
-------------------------------------------

Thank you [~thobbs] and [~deckerego]! :)

> DROP TABLE should also drop BATCH prepared statements associated to it
> ----------------------------------------------------------------------
>
>                 Key: CASSANDRA-8652
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8652
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Edward Ribeiro
>            Assignee: Edward Ribeiro
>              Labels: cql3
>             Fix For: 2.1.3
>
>         Attachments: batch-exception.patch
>
>
> When a Keyspace or Column Family is dropped, Cassandra should evict the cached prepared statements that reference that keyspace and/or table as partially solved by the issue https://issues.apache.org/jira/browse/CASSANDRA-7566. 
> Unfortunately, when it's a BATCH prepared statement it is not being evicted from the cache. Executing the BATCH statement after a drop of KS/CF, and subsequent recreation of KS/CF with same name, should NOT retrieve them from cache, or else the batch prepared statements will throw an error like {{java.lang.IllegalArgumentException: Unknown CF fd47fd00-a0d1-11e4-8be2-75ac7e9e28a5}} because the statements inside the batch statement still hold a reference to the old (pre-dropping) cf_id. 
> The attached patch solves this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)