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

Andrés de la Peña commented on CASSANDRA-10130:
-----------------------------------------------

I also think that the lockless version is cleaner. I have pulled it and made 
some changes [here|https://github.com/adelapena/cassandra/tree/10130-trunk]:
\\
\\
* 
[Set|https://github.com/adelapena/cassandra/commit/ffc328e7af8f32c0f6027338ec3fb503ce75f983]
 the {{SettableFuture}} in {{createIndex}} callback after marking the index to 
be sure that the marking is done when the returned future finishes.
* 
[Fix|https://github.com/adelapena/cassandra/commit/c5604ffd5ae36cc34d13af6c4c4eadba98458fa3]
 {{SIM#isIndexQueryable}} to ensure that the indexes are not queryable while 
they are been initialized, which was making [this 
test|https://github.com/apache/cassandra/blob/69aa1737d17089278c725cffeca3f69fb25f0aa0/test/unit/org/apache/cassandra/cql3/validation/entities/SecondaryIndexTest.java#L1065]
 
[fail|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-10130-trunk-sergio-testall/lastCompletedBuild/testReport/].
* 
[Update|https://github.com/adelapena/cassandra/commit/e075b42e4a7c3a8fcc11ca51388e38ebcbd075b4]
 {{CassandraIndexTest#indexCorrectlyMarkedAsBuildAndRemoved}} again to the 
check new expected behaviour. 

It seems that new lockless version is making 
[{{scrub_test.TestScrubIndexes.test_standalone_scrub}}|https://github.com/riptano/cassandra-dtest/blob/4031157a28bbefa068820c757457f340f4b77fa0/scrub_test.py#L391]
 to 
[fail|http://cassci.datastax.com/view/Dev/view/adelapena/job/adelapena-10130-trunk-dtest/lastCompletedBuild/testReport/scrub_test/TestScrubIndexes/test_standalone_scrub/],
 I'm still diving into it.

bq. I'm not sure if we should keep the rebuildFromSSTablesBlocking protected or 
make it public, I can see if being useful to rebuild a subset of the SSTables 
but It's not currently used anywhere, but it could maybe used by extensions.

I think it's a good idea to make it public to allow extensions to use it, and 
it is used in 
[{{CassandraIndexTest#indexCorrectlyMarkedAsBuildAndRemoved}}|https://github.com/adelapena/cassandra/blob/eb0316d651bbdec70896be041ab1981cc9349a18/test/unit/org/apache/cassandra/index/internal/CassandraIndexTest.java#L542].

bq. On a side note, I noticed that [this 
statement|https://github.com/adelapena/cassandra/blob/c5604ffd5ae36cc34d13af6c4c4eadba98458fa3/test/unit/org/apache/cassandra/index/SecondaryIndexManagerTest.java#L369]
 is wrong (missing table name) but it's not throwing exception? Should we 
create a ticket for this?

I think it isn't wrong. The {{%%s}} is transformed into {{%s}} by the first 
{{String#format}}. Then, {{CQLTest#createIndex}} 
[applies|https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/cql3/CQLTester.java#L650]
 another {{String#format}} call to set the name of the current table.







> Node failure during 2i update after streaming can have incomplete 2i when 
> restarted
> -----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-10130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10130
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Coordination
>            Reporter: Yuki Morishita
>            Assignee: Andrés de la Peña
>            Priority: Minor
>
> Since MV/2i update happens after SSTables are received, node failure during 
> MV/2i update can leave received SSTables live when restarted while MV/2i are 
> partially up to date.
> We can add some kind of tracking mechanism to automatically rebuild at the 
> startup, or at least warn user when the node restarts.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to