Question

Following up from this, is it safe to terminate (SIGINT, etc) the sstableloader process while it is waiting for the secondary index build to complete? i.e. Does the tool perform any other critical action after the secondary index build? Will the import be rolled back if I do not allow the tool to exit on its own?

If it is safe to terminate the sstableloader process, it is also safe to start another while the previous instance's secondary index build is not yet done?

Finally, is there a way to make the index build asynchronous so that the tool won't wait for it to complete before exiting?

EDIT:

If it's not safe to terminate the sstableloader process itself, can I at least stop the index build process via 'nodetool stop INDEX_BUILD'? Will it cause the sstableloader to exit properly? Will the cancelled index build be retried automatically in the background?

Was it helpful?

Solution

The SSTableLoader won't have any bad effect by terminating it. You can run it over the same set of SSTables multiple times without having to worry about data corruption.

The follow on SSTable index build happens automatically in the background. You can increase the number of concurrent compaction threads. Multiple indexes can be built simultaneously.

Building indexes is time consuming and often takes longer than ingest, but the data will be available to read and write.

You could manually stop the index_build, I'm not sure that that will cause the SSTableLoader to exit (because I've never tried it) but you'll then need to tell cassandra to rebuild the index using nodetool.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top