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

Sam Tunnicliffe updated CASSANDRA-12039:
----------------------------------------
    Status: Open  (was: Patch Available)

In principle I think this is fine, there's just a couple of things:
* Pre-join tasks are not executed if a node is started in write survey mode and 
then fully joins the ring later. 
* If bootstrap fails and is subsequently resumed, pre-join tasks are not 
executed on its completion.
* {{Index::getPreJoinTask}} should have a default no-op implementation (and the 
same can then be removed from {{CassandraIndex}} & {{CustomCassandraIndex}})

This area is not particularly amenable to testing, especially unit testing. The 
utest in the patch is welcome, but I'd be happier if we also had some coverage 
of other scenarios, such as verifying the value of the {{hadBootstrap}} 
argument depending on whether bootstrap occurred or not & handling of the 
scenarios I mentioned above. This means dtests really, which rules out using a 
custom/stub index that can be easily observed. I think it would be sufficient 
to add some debug logging to {{StorageService::executePreJoinTasks}} and check 
for that in the node logs. 


> Add an index callback to be notified post bootstrap and before joining the 
> ring
> -------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-12039
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12039
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Sergio Bossa
>            Assignee: Sergio Bossa
>
> Custom index implementations might need to be notified when the node finishes 
> bootstrapping in order to execute some blocking tasks before the node itself 
> goes into NORMAL state.
> This is a proposal to add such functionality, which should roughly require 
> the following:
> 1) Add a {{getPostBootstrapTask}} callback to the {{Index}} interface.
> 2) Add an {{executePostBootstrapBlockingTasks}} method to 
> {{SecondaryIndexManager}} calling into the previously mentioned callback.
> 3) Hook that into {{StorageService#joinTokenRing}}.
> Thoughts?



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

Reply via email to