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

Aleksey Yeschenko commented on CASSANDRA-6477:
----------------------------------------------

{{SchemaKeyspace.makeDropKeyspaceMutation()}} is the problem, in particular 
these two calls:

{code}
mutation.add(PartitionUpdate.fullPartitionDelete(SystemKeyspace.BuiltMaterializedViews,
 mutation.key(), timestamp, nowInSec));
mutation.add(PartitionUpdate.fullPartitionDelete(SystemKeyspace.MaterializedViewsBuildsInProgress,
 mutation.key(), timestamp, nowInSec));
{code}

The problem is that those tables are in a different keyspace ({{system}}) and 
cannot be added to the mutation for {{system_schema}}. The fix is to do what I 
did in CASSANDRA-6717 for built indexes.

Once it's done, nits:
- Still see non-underscore-separated {{MATERIALIZEDVIEWS}} and 
{{"materializeviews"}} in MV-related table names and constants, now in 
{{SystemKeyspace}}
- built and in-progress tables can be made private
- {{BuiltMaterializedViews}} formatting is all messed up, and for some reason 
(copy-paste from {{BuiltIndexes}} most likely) double-quotes the table name 
needlessly

> Materialized Views (was: Global Indexes)
> ----------------------------------------
>
>                 Key: CASSANDRA-6477
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6477
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Carl Yeksigian
>              Labels: cql
>             Fix For: 3.0 alpha 1
>
>         Attachments: test-view-data.sh, users.yaml
>
>
> Local indexes are suitable for low-cardinality data, where spreading the 
> index across the cluster is a Good Thing.  However, for high-cardinality 
> data, local indexes require querying most nodes in the cluster even if only a 
> handful of rows is returned.



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

Reply via email to