Search code examples
cassandradatastaxcassandra-2.0cassandra-3.0

Does cassandra upgrade require to run nodetool upgradesstables for cluster holding TTLed data


I am running 3 node apache cassandra cluster as docker container holding timeseries data with 45 days TTL.

I am planning to upgrade the current cassandra version 2.2.5 to cassandra 3.11.4 release. Following steps are identified for the upgrade -

  1. Backup existing data
  2. Flush one of the cassandra node

    bin/nodetool -h cassandra1 -u ca_itoa -pw ca_itoa drain

  3. Stop the cassandra1 node

  4. Start the new cassandra 3.11.4 container

  5. Upgrade the SSTable

    bin/nodetool -u ca_itoa -pw ca_itoa upgradesstables

  6. Check the node status. Repeat the process for the rest of the nodes

I have few questions about the upgrade process -

  1. Are the steps correct?
  2. Is it manodatory to run upgradesstables command. It is time consuming, and I want to see if I can avoid. The data has TTL set. Will the cassandra continue writing in new SSTable format whereas the old SSTable data get cleaned-up on expiring? Assumption is that, after 45 days, all SSTable would be in new shiny format.

Solution

  • Yes, you need to run nodetool sstableupgrade on each node after cassandra upgrade as you are upgrading from 2.2.x to 3.11.4. sstable file format and ext also will change. You may run this process on background and it will not create any issue. please refer below links for more details https://blog.thethings.io/upgrading-apache-cassandra-cluster/