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

Sylvain Lebresne commented on CASSANDRA-13994:
----------------------------------------------

Getting back to the KEYS index question.

bq. I don't think user can upgrade to 4.0 at all if they still have KEYS index.

I was wrong.

I tested it now (see [this upgrade 
test|https://github.com/pcmanus/cassandra-dtest/commit/09a6a9888a73eb14613eaecb4dc7e5cba9a46765#diff-59d5ceaa3ba81b0a9a360dedcf3bed16R378],
 but you if you create a KEYS index through thrift (in 2.x/3.x), {{DROP COMPACT 
STORAGE}} on the base table and then uprade from 3.11 to 4.0, this 'just work'™ 
(a rolling upgrade can be done while continuing to use the KEYS index before, 
during and after the upgrade).

I though this would have broke because 4.0 crashes if it finds tables with 
compact storage "flags" when reading the schema system tables, but 2i metadata 
are not written there so this pass. We still hit [this 
warning|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/schema/TableMetadata.java#L140]
 (and we should remove the calls to {{isDense}} and {{isCompound}} in 
{{CassandraIndex}} to avoid that) but that is the only consequence.

So my opinion here is that we should keep KEYS index for now (so revert their 
removal by this ticket), as we currently imo don't have a good upgrade story 
for them otherwise. We can look at this more closely later, but for me, it's 
not urgent, as their code is not that complex and fairly isolated.

I'll create a followup ticket soonish to add that upgrade test mentioned above 
and discuss a few minor related points, but as far as this ticket goes, let's 
keep KEYS indexes.


> Remove COMPACT STORAGE internals before 4.0 release
> ---------------------------------------------------
>
>                 Key: CASSANDRA-13994
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13994
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Legacy/Local Write-Read Paths
>            Reporter: Alex Petrov
>            Assignee: Ekaterina Dimitrova
>            Priority: Low
>             Fix For: 4.0, 4.0-alpha
>
>
> 4.0 comes without thrift (after [CASSANDRA-11115]) and COMPACT STORAGE (after 
> [CASSANDRA-10857]), and since Compact Storage flags are now disabled, all of 
> the related functionality is useless.
> There are still some things to consider:
> 1. One of the system tables (built indexes) was compact. For now, we just 
> added {{value}} column to it to make sure it's backwards-compatible, but we 
> might want to make sure it's just a "normal" table and doesn't have redundant 
> columns.
> 2. Compact Tables were building indexes in {{KEYS}} mode. Removing it is 
> trivial, but this would mean that all built indexes will be defunct. We could 
> log a warning for now and ask users to migrate off those for now and 
> completely remove it from future releases. It's just a couple of classes 
> though.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to