[
https://issues.apache.org/jira/browse/CASSANDRA-9960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14661607#comment-14661607
]
Robert Stupp commented on CASSANDRA-9960:
-----------------------------------------
[~shinigami], I tried to reproduce it using a unit test. But my test passes
against 2.2.0. Do you have some more information? Any changes to cassandra.yaml?
{code:java}
@Test
public void testRecreateKs() throws Throwable
{
// note: keyspace already exists
for (int i = 0; i < 100; i++)
{
execute("CREATE TYPE " + KEYSPACE_PER_TEST + ".foo (a int, b text,
c inet, d map<text,int>)");
for (int t = 0; t < 10; t++)
{
execute("CREATE TABLE " + KEYSPACE_PER_TEST + ".tab" + t + "
(pk int PRIMARY KEY, udt frozen<foo>, val text)");
for (int row = 0; row < 100; row++)
{
execute("INSERT INTO " + KEYSPACE_PER_TEST + ".tab" + t + "
(pk, val) VALUES (?,?)", row, Integer.toBinaryString(row));
}
}
// assert UDT is in system table
assertRows(execute("SELECT keyspace_name, type_name FROM " +
SystemKeyspace.NAME + '.' + LegacySchemaTables.USERTYPES),
row(KEYSPACE_PER_TEST, "foo"));
assertRows(execute("SELECT keyspace_name, type_name FROM " +
SystemKeyspace.NAME + '.' + LegacySchemaTables.USERTYPES +
" WHERE keyspace_name='" + KEYSPACE_PER_TEST +
"' AND type_name='foo'"),
row(KEYSPACE_PER_TEST, "foo"));
// unconditional DROP + CREATE
dropPerTestKeyspace(false);
createPerTestKeyspace(false);
// assert UDT not in system table
assertRows(execute("SELECT keyspace_name, type_name FROM " +
SystemKeyspace.NAME + '.' + LegacySchemaTables.USERTYPES));
assertRows(execute("SELECT keyspace_name, type_name FROM " +
SystemKeyspace.NAME + '.' + LegacySchemaTables.USERTYPES +
" WHERE keyspace_name='" + KEYSPACE_PER_TEST +
"' AND type_name='foo'"));
}
}
{code}
> UDTs still visible after drop/recreate keyspace
> -----------------------------------------------
>
> Key: CASSANDRA-9960
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9960
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Jaroslav Kamenik
> Assignee: Robert Stupp
> Priority: Critical
> Fix For: 2.2.x
>
>
> When deploying my app from the scratch I run sequence - drop keyspaces,
> create keyspaces, create UDTs, create tables, generate lots of data... After
> few cycles, randomly, cassandra ends in state, where I cannot see anything in
> table system.schema_usertypes, when I select all rows, but queries with
> specified keyspace_name and type_name return old values. Usually it helps to
> restart C* and old data disapear, sometimes it needs to delete all C* data.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)