Migrating to incremental repairs
Migrating to incremental repairs requires several steps to change nodes because SSTable metadata has changed, adding the RepairedAt field.
Migrating to incremental repairs
sstablerepairedset
utility is recommended only under the following conditions:- You are doing an incremental repair for the first time.
- You are using the leveled compaction strategy.
- sstablemetadata for checking the repaired or unrepaired status of an SSTable
- sstablerepairedset for manually marking an SSTable as repaired
sstablemetadata <sstable filenames>
sstablerepairedset [--is-repaired | --is-unrepaired] [-f <sstable-list> | <sstables>]In Cassandra 2.1.1, sstablerepairedset can take as arguments a list of SSTables on the command line or a file of SSTables with a "-f" flag.
This example shows how to use sstablerepairedset to clear the repaired state of an SSTable, rendering the SSTable unrepaired. As mentioned above, because until the first incremental repair, Cassandra does not know the repaired state of SSTables, this example shows how to use sstablerepairedset to clear the repaired state of an SSTable, rendering the SSTable unrepaired.
- Stop the node.
- Run this
command:
sstablerepairedset --is-unrepaired -f list_of_sstable_names.txt
- Restart the node.
All data is changed to an unrepaired state.
Procedure for migrating to incremental repairs
To migrate to incremental repair, one node at a time:
- Disable compaction on the node using nodetool disableautocompaction.
- Run the default full, sequential repair.
- Stop the node.
- Use the tool sstablerepairedset to mark all the SSTables that were created before you disabled compaction.
- Restart cassandra
SSTables remain in a repaired state after running a full, but not a partition range, repair if you make no changes to the SSTables.