cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Petrov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-12374) Can't rebuild SASI index
Date Fri, 05 Aug 2016 16:09:20 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-12374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alex Petrov updated CASSANDRA-12374:
------------------------------------
    Reviewer: Pavel Yaskevich
      Status: Patch Available  (was: Open)

I've discovered another slight problem with rebuild, it's related to the fact that {{SASIIndexBuilder}}
is returning an empty static row anyways, which results into inability to rebuild the index.
Usually it's skipped with 

{code}
if (!sstable.header.hasStatic())
            return Rows.EMPTY_STATIC_ROW;
{code}

or something similar.

I've also added a test, although it requires sleeping for a second which I'm not a very big
fan of. We could remove the file and check re-creation, but I decided to go that way to make
sure we rebuild not only when the file's not present, but also when it's there and we just
need a rebuild.

|[trunk|https://github.com/ifesdjeen/cassandra/tree/12374-trunk]|[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12374-trunk-testall/]|[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-12374-trunk-dtest/]
|


> Can't rebuild SASI index
> ------------------------
>
>                 Key: CASSANDRA-12374
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12374
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Alex Petrov
>
> There's been no real requirement for that so far. 
> As [~beobal] has pointed out, it's not a big issue, since that only could be needed when
index files are lost, data corruption on disk (hardware issue) has occurred or there was a
bug that'd require an index rebuild.
> During {{rebuild_index}} task, indexes are only "marked" as removed with {{SecondaryIndexManager::markIndexRemoved}}
and then {{buildIndexesBlocking}} is called. However, since SASI keeps track of SSTables for
the index, it's going to filter them out with {{.filter((sstable) -> !sasi.index.hasSSTable(sstable))}}
in {{SASIIndexBuildingSupport}}.
> If I understand the logic correctly, we have to "invalidate" (drop data) right before
we re-index them. This is also a blocker for [CASSANDRA-11990] since without it we can't have
an upgrade path.
> I have a patch ready in branch, but since it's a bug, it's better to have it released
earlier and for all branches affected.
> cc [~xedin]



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

Mime
View raw message