Stage 7 - Upgrade Cassandra (3.11.X -> 3.11.13)

Stage 7 - Upgrade Cassandra (3.11.X -> 3.11.13)

Objective

Upgrade Apache Cassandra from the current version 3.11.X (where X = 1..12) to version 3.11.13.


Prerequisites

  1. Cassandra was installed using the yum package manager.
    If you installed Cassandra using the tarball (.tar.gz), ex: if you’re on Windows, substitute the yum & systemctl service control commands with the steps shown in Apache Cassandra (Single & Multi-Node/Cluster) Setup & Testing Instructions for Windows (2012-R2 x64) | ApacheCassandra(Single&Multi Node/Cluster)Setup&TestingInstructionsforWindows(2... ( Make sure the value for cluster_name is set to the same value as that in your current version of Cassandra)

  2. Run the following command to check if Cassandra 3.11.1 ~ 3.11.12 is running as a service.

systemctl --type=service --state=active | grep cassandra

The output should be similar to as shown below.

cassandra.service loaded active running Cassandra NoSQL database

Steps

  1. Stop Cassandra by running the following command.

    sudo systemctl stop cassandra
  2. Upgrade Cassandra by running the following command.

    sudo yum upgrade cassandra

Depending on what version you are upgrading from, you should see output similar to the below (below is a log output when upgrading from Cassandra 3.11.9 to 3.11.13).

If you are upgrading from a much older version, the package manager may ask how you wish to handle configuration file changes, ex: in cassandra.yaml and jvm.options files. If there are any changes, it should present you the option to either accept the package provided configuration files, use your configuration files, or perform a diff. It is recommend you perform a diff and manually merge the new changes/additions/deletions in. When doing so, be careful to not reset your cluster_name or any network hostname (ex: localhost ) or IP-related values!

Loaded plugins: fastestmirror, versionlock Loading mirror speeds from cached hostfile epel/x86_64/metalink | 20 kB 00:00:00 * base: mirrors.linode.com * epel: paducahix.mm.fcix.net * extras: mirrors.linode.com * updates: mirrors.linode.com base | 3.6 kB 00:00:00 cassandra-dev/signature | 833 B 00:00:00 cassandra-dev/signature | 2.9 kB 00:00:00 !!! cassandra-stable/signature | 833 B 00:00:00 cassandra-stable/signature | 2.9 kB 00:00:00 !!! epel | 4.7 kB 00:00:00 extras | 2.9 kB 00:00:00 scaleft/signature | 870 B 00:00:00 scaleft/signature | 2.9 kB 00:00:00 !!! updates | 2.9 kB 00:00:00 (1/4): epel/x86_64/group_gz | 97 kB 00:00:00 (2/4): epel/x86_64/updateinfo | 1.1 MB 00:00:00 (3/4): updates/7/x86_64/primary_db | 16 MB 00:00:00 (4/4): epel/x86_64/primary_db | 7.0 MB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package cassandra.noarch 0:3.11.9-1 will be updated ---> Package cassandra.noarch 0:3.11.13-1 will be an update --> Finished Dependency Resolution Dependencies Resolved ====================================================================================================================================================================================================================================== Package Arch Version Repository Size ====================================================================================================================================================================================================================================== Updating: cassandra noarch 3.11.13-1 cassandra-dev 29 M Transaction Summary ====================================================================================================================================================================================================================================== Upgrade 1 Package Total download size: 29 M Is this ok [y/d/N]: y Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. cassandra-3.11.13-1.noarch.rpm | 29 MB 00:00:02 Running transaction check Running transaction test Transaction test succeeded Running transaction Running transaction Updating : cassandra-3.11.13-1.noarch 1/2 warning: /etc/cassandra/default.conf/cassandra.yaml created as /etc/cassandra/default.conf/cassandra.yaml.rpmnew Cleanup : cassandra-3.11.9-1.noarch 2/2 Verifying : cassandra-3.11.13-1.noarch 1/2 Verifying : cassandra-3.11.9-1.noarch 2/2 Updated: cassandra.noarch 0:3.11.13-1 Complete!

Verification

  1. Run the following command to check the Cassandra version.

    nodetool version

    You should see an output similar to the following.

    ReleaseVersion: 3.11.13
  2. Confirm batch_size_warn_threshold_in_kb and batch_size_fail_threshold_in_kb in /etc/cassandra/default.conf/cassandra.yaml have been bumped up from their defaults, ex:

    batch_size_warn_threshold_in_kb: 250 batch_size_fail_threshold_in_kb: 300

    If you make changes to the above, restart the Cassandra service:

    sudo systemctl restart cassandra

    If you frequently deal with large artifact sizes you may want to configure your monitoring to watch for the “batch size” warn messages and bump up as needed.