Ludovic Boutros commented on CASSANDRA-14055:


??As I am writing this, however, I am realizing we want to keep a reference to 
the newer index, which references the newer SSTable instance and my patch does 
the opposite — keeping the old instance. I will post an updated patch along 
with my trunk patch for internal review, but the gist is to change the order we 
iterate over the old view and new indexes to favor new index instances.??

That was the point of my initial patch. But I aggree, if we can increment the 
global ref count with the new index before releasing the old one and therefore 
prevent the index file deletion, that would be better.

> Index redistribution breaks SASI index
> --------------------------------------
>                 Key: CASSANDRA-14055
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14055
>             Project: Cassandra
>          Issue Type: Bug
>          Components: sasi
>            Reporter: Ludovic Boutros
>            Assignee: Ludovic Boutros
>            Priority: Major
>              Labels: patch
>             Fix For: 3.11.x, 4.x
>         Attachments: CASSANDRA-14055-jrwest.patch, CASSANDRA-14055.patch, 
> CASSANDRA-14055.patch, CASSANDRA-14055.patch
> During index redistribution process, a new view is created.
> During this creation, old indexes should be released.
> But, new indexes are "attached" to the same SSTable as the old indexes.
> This leads to the deletion of the last SASI index file and breaks the index.
> The issue is in this function : 
> [https://github.com/apache/cassandra/blob/9ee44db49b13d4b4c91c9d6332ce06a6e2abf944/src/java/org/apache/cassandra/index/sasi/conf/view/View.java#L62]

This message was sent by Atlassian JIRA

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

Reply via email to