Upgrade SSTables
Run this operation when the server version is upgraded or when changing compression options.
If the SSTables are already on the current version, the command returns immediately and no action is taken.
To run the nodetool upgradesstables
operation, modify and submit the CassandraTask
custom resource definition to the Data Plane
Kubernetes cluster where the datacenter is deployed.
Mission Control detects the upgradesstables
CassandraTask
custom resource definition (CRD), iterates one rack at a time, and triggers and monitors upgrade operations one pod at a time. Mission Control reports task progress and status.
Performance impact
During an SSTable upgrade, additional disk pressure occurs while all SSTables are rewritten to the correct format (if required). Read performance improves upon completion of the SSTable format upgrade.
Prerequisites
-
A prepared environment on either bare-metal/VM or an existing Kubernetes cluster.
Upgrade SSTables
Decide to upgrade SSTables in one or multiple datacenters (DCs), or all datacenters. You have granular control over choosing target datacenters and their assigned rack.
Choose User Interface (UI) or Command Line Interface (CLI) steps.
-
UI - one/multiple DCs
-
UI - all DCs
-
CLI
-
In the Home Clusters dialog, click the target cluster namespace.
-
In the Nodes section of the Overview tab:
-
Click the row checkbox for your target datacenter.
-
Click the overflow menu icon (3 dots) on your target datacenter.
-
Click Upgrade sstables.
-
To upgrade SSTables in more than one datacenter, repeat sub-steps a, b, and c for each target datacenter.
-
The SSTables upgrade starts immediately.
To view notifications from the upgrade operation, see Monitor SSTables upgrade activity status.
-
In the Home Clusters dialog, click the target cluster namespace.
-
In the Nodes section of the Overview tab, click the Name checkbox. This selects all datacenter row checkboxes.
-
Click Bulk Actions.
-
In the Bulk Actions dialog:
-
Make sure that the Action type is Upgrade sstables.
-
Make sure that All is your target datacenter selection.
In the Racks field, All is the default and only selection.
-
Click Run.
-
The SSTable upgrade activity starts immediately.
To review upgrade operation notifications, see Monitor SSTables upgrade activity status.
This example uses a single datacenter deployed in the Data Plane
Kubernetes cluster.
Adjust the YAML file as needed for the number of datacenters and racks in your deployment.
-
Modify the
demo.cassandratask.yaml
file to define anupgradesstables
CassandraTask
.Here is a sample:
apiVersion: control.k8ssandra.io/v1alpha1 kind: CassandraTask metadata: name: upgradesstables-dc1 spec: datacenter: name: dc1 namespace: demo jobs: - name: upgradesstables-dc1 command: upgradesstables args: keyspace_name: my_keyspace
Key options:
-
metadata.name
: a unique identifier within the Kubernetes namespace where the task is submitted. While the name can be any value, consider including the cluster name to prevent collision with other options. -
spec.datacenter
: a uniquenamespace
andname
combination used to determine which datacenter to target with this operation. -
spec.jobs[0].command
: MUST beupgradesstables
for this operation. -
Optional:
spec.jobs[0].args.keyspace_name
: restricts this operation to a particular keyspace. Omitting this value results in ALL keyspaces being updated. By default all keyspaces are rebuilt.
-
-
Submit the
upgradesstables
CassandraTask
custom resource definition to the Kubernetes cluster where theData Plane
and the specified datacenter are deployed with this command:kubectl apply -f demo-dse.casssandratask.yaml -n mission-control
Use the
-n
flag to indicate the Kubernetes namespace, which MUST bemission-control
.
Monitor SSTables upgrade activity status
-
UI
-
CLI
-
In the main navigation, click Activities.
-
See Status notifications regarding the progress of the SSTables upgrade activity.
A status of SUCCESS indicates the upgrade operation completed without issue. Timestamps are issued for the Start and End of the upgrade activity.
The Activities pane refreshes often and automatically.
-
Monitor the SSTables upgrade progress:
kubectl get cassandratask upgradesstables-dc1 | yq .status
Sample results
... status: completionTime: "2022-10-20T18:07:08Z" conditions: - lastTransitionTime: "2022-10-20T18:06:57Z" status: "True" type: Running - lastTransitionTime: "2022-10-20T18:07:08Z" status: "True" type: Complete startTime: "2022-10-20T18:06:57Z" succeeded: 3
Mission Control sets the
startTime
field prior to starting theupgradesstables
operation. It updates thecompletionTime
field as theupgradesstables
operation completes.The sample output indicates that the task is completed with the
type: Complete
status condition set toTrue
. Thesucceeded: 3
field indicates that three (3) nodes (or pods) completed the requested task successfully. Afailed
field tracks a running count of pods that failed theupgradesstables
operation.