Upgrades for DataStax Enterprise 5.1.x patch releases

Steps for upgrading DataStax Enterprise 5.1 between patch (point) releases.

Review this information on upgrading DataStax Enterprise (DSE) between patch (point) releases, such as upgrading from DataStax Enterprise 5.1.3 to 5.1.5.

Attention: Read and understand these instructions before upgrading. Carefully reviewing the planning and upgrade instructions can prevent errors and data loss.


The location of the dse.yaml file depends on the type of installation:
Package installations /etc/dse/dse.yaml
Tarball installations installation_location/resources/dse/conf/dse.yaml

DataStax driver changes

DataStax drivers come in two types:

  • DataStax drivers for DataStax Enterprise — for use by DSE 4.8 and later
  • DataStax drivers for Apache Cassandra™ — for use by Apache Cassandra™ and DSE 4.7 and earlier
Note: While the DataStax drivers for Apache Cassandra drivers can connect to DSE 5.0 and later clusters, DataStax strongly recommends upgrading to the DSE drivers. The DSE drivers provide functionality for all DataStax Enterprise features.

DataStax Enterprise and Apache Cassandra™ configuration files

Configuration file Installer-Services and package installations Installer-No Services and tarball installations
DataStax Enterprise configuration files
byoh-env.sh /etc/dse/byoh-env.sh install_location/bin/byoh-env.sh
dse.yaml /etc/dse/dse.yaml install_location/resources/dse/conf/dse.yaml
logback.xml /etc/dse/cassandra/logback.xml install_location/resources/logback.xml
spark-env.sh /etc/dse/spark/spark-env.sh install_location/resources/spark/conf/spark-env.sh
spark-defaults.conf /etc/dse/spark/spark-defaults.conf install_location/resources/spark/conf/spark-defaults.conf
Cassandra configuration files
cassandra.yaml /etc/cassandra/cassandra.yaml install_location/conf/cassandra.yaml
cassandra.in.sh /usr/share/cassandra/cassandra.in.sh install_location/bin/cassandra.in.sh
cassandra-env.sh /etc/cassandra/cassandra-env.sh install_location/conf/cassandra-env.sh
cassandra-rackdc.properties /etc/cassandra/cassandra-rackdc.properties install_location/conf/cassandra-rackdc.properties
cassandra-topology.properties /etc/cassandra/cassandra-topology.properties install_location/conf/cassandra-topology.properties
jmxremote.password /etc/cassandra/jmxremote.password install_location/conf/jmxremote.password
Tomcat server configuration file
server.xml /etc/dse/resources/tomcat/conf/server.xml install_location/resources/tomcat/conf/server.xml

General recommendations

Warning: TTL expiration timestamps are susceptible to the year 2038 problem. If the TTL value is long and an expiration date that is greater than the maximum threshold of 2038-01-19T03:14:06+00:00, the data is immediately expired and purged on the next compaction. DataStax strongly recommends upgrading to DSE 5.1.7 or later and taking required action to protect against silent data loss. (DSP-15412).
Attention: DataStax recommends upgrading to the latest DSE 5.1.17.

OpsCenter provides a Backup Service that manages enterprise-wide backup and restore operations for DataStax Enterprise clusters. OpsCenter 6.5 and later is recommended.

General restrictions and limitations during the upgrade process

Restrictions and limitations apply while a cluster is in a partially upgraded state. The cluster continues to work as though it were on the earlier version of DataStax Enterprise until all of the nodes in the cluster are upgraded.

Restrictions for all nodes during an upgrade
  • Do not enable new features.
  • Do not run nodetool repair.
  • Do not bootstrap or decommission nodes.
  • Failure to upgrade SSTables when required results in a significant performance impact and increased disk usage. Upgrading is not complete until the SSTables are upgraded.
Note: Nodes on different versions might show a schema disagreement during an upgrade.
DSE Analytics (Spark) upgrade restrictions
  • Do not run analytics jobs until all nodes are upgraded.
  • Kill all Spark worker processes before you stop the node and install the new version.
DSE Search (Solr) upgrade restrictions and limitations
  • Do not update schemas.
  • Do not reindex DSE Search nodes during upgrade.
  • Do not issue these types of queries during a rolling restart: DDL or TRUNCATE.
Security upgrade restrictions
  • Do not change security credentials or permissions until after the upgrade is complete.
  • If you are not already using Kerberos, do not set up Kerberos authentication before upgrading. First upgrade the cluster, then set up Kerberos.
DSE Graph
  • Because DSE Graph is generally run with other workloads, follow the same upgrade limitations for those workloads.
  • Do not create or update any graph or other schemas during the upgrade.
  • You can safely ignore gremlin and graph related errors during the upgrade.

Special upgrade restrictions for 5.1.x patch releases

Restrictions when upgrading to DSE 5.1.0-5.1.5
DSE Search might miss token filtering on mixed versions clusters. Upgrade all nodes to DSE 5.1.6 or later for correct token filtering.
Restrictions when upgrading to DSE 5.1.4
DSE Analytics Spark Jobserver uses DSE custom version Applications must use the compatible Spark Jobserver API in the DataStax repository.
Restrictions when upgrading to DSE 5.1.6 and later
DSE Analytics DSEFS authorization is enabled only if DSE authorization is enabled. Clusters with DSE authentication enabled and DSE authorization disabled will not have DSEFS authorization after upgrading to 5.1.6 and later. In versions prior to DSE 5.1.6 DSEFS, authorization was enabled when DSE authentication was enabled, and enabling or disabling DSE authorization had no effect on DSEFS.
Restrictions when upgrading to DSE 5.1.3
  • Creating Materialized View with filtering on non-primary-key base column (CASSANDRA-10368) is disabled, because the liveness of view row is depending on multiple filtered base non-key columns and base non-key column used in view primary-key. This semantic cannot be supported without storage format change (CASSANDRA-13826). For append-only use case, you can still use this feature with a system property switch:
  • The table system_auth.resource_role_permissons_index is no longer used and must be dropped after all nodes are on 5.1.3.
  • Non-incremental full repairs are now the default if no option is specified on nodetool repair, unless incremental repair was already run on the table/keyspace being repaired, to maintain backward compatibility. To run incremental repair on new tables, use the ‑inc option.
  • Incremental repairs are no longer supported on tables with materialized views or CDC until its limitations are addressed. An incremental repair triggered on a base table or materialized view run a full repair instead (CASSANDRA-12888).
  • Restrictions when upgrading from DSE 5.1.1 or 5.1.2 to DSE 5.1.3
    • Apache Cassandra no longer allows dropping columns on tables with Materialized Views.
    • A change was made in the way the Materialized View timestamp is computed. This change can cause an old deletion to a base column, which is a view primary key (PK) column, to not be reflected in the view if you repair the base table after the upgrade. This condition only occurs when a column deletion to an MV primary key (PK) column not present in the base table PK (via UPDATE base SET view_pk_col = null or DELETE view_pk_col FROM base) is missed before the upgrade and repaired after the upgrade. If such column deletions are done on a view PK column that is not a base PK, run repair on the base table of all nodes prior to the upgrade. Alternatively, you can fix potential inconsistencies by running repair on the views after upgrade or drop and re-create the views. For more details, see CASSANDRA-11500.
    • Removal of columns not selected in the Materialized View (via UPDATE base SET unselected_column = null or DELETE unselected_column FROM base) may not be properly reflected in the view in some situations. DataStax advises against deletions on base columns not selected in views until fixed in CASSANDRA-13826.

Advanced preparation for upgrading from DSE 5.1.1 to 5.1.2 and later 5.1.x releases

This section applies only when upgrading from DSE 5.1.1 to 5.1.2 and later DSE 5.1.x releases.

The messaging protocol version in DSE 5.0.9 and DSE 5.1.2 has been changed to VERSION_3014. Schema migrations rely on exact messaging protocol versions. To accommodate schema changes that might occur during the upgrade, force a backward compatible messaging protocol.

  1. Before you upgrade, restart the node with this start-up parameter:
    For example:
    installation_location/bin/dse cassandra -Dcassandra.force_3_0_protocol_version=true
    Note: While mixed versions exist during the upgrade, do not add or remove columns from existing tables.
  2. After the upgrade is complete on all nodes, follow the upgrade steps to restart nodes without this start-up parameter.

Preparing to upgrade

  1. Back up your data. DataStax recommends backing up your data prior to any version upgrade, including logs and custom configurations. A backup provides the ability to revert and restore all the data used in the previous version if necessary.
    Tip: OpsCenter provides a Backup Service that manages enterprise-wide backup and restore operations for DataStax Enterprise clusters. OpsCenter 6.5 and later is recommended.
  2. Verify your current product version:
    dse -v
  3. Before upgrading, be sure that each node has ample free disk space.

    The required space depends on the compaction strategy. See Disk space.

  4. Familiarize yourself with the changes and features in DataStax Enterprise and Apache Cassandra™:
    • DataStax Enterprise release notes for the upgrade version and complete all required actions.

      DSE release notes include required planning, components, changes and enhancements, known issues, and resolved issues. See 5.1, 5.0, and 4.8.

    • General upgrading advice for any version and New features for Apache Cassandra in NEWS.txt. Be sure to read the NEWS.txt all the way back to your current version.
    • Apache Cassandra™ changes in CHANGES.txt.
    • DataStax Enterprise production-certified changes to Apache Cassandra in the DSE release notes.
    • DataStax driver changes.
  5. DSE Search nodes:
    • Ensure that the catalina.properties and context.xml files are present in the Tomcat conf dir. DSE will not start after upgrade if these files are missing.
      The default location of the Tomcat conf directory depends on the type of installation:
      • Package installations: /etc/dse/tomcat/conf
      • Tarball installations: installation_location/resources/tomcat/conf
    • Tune the schema before you upgrade. For DSE 5.1.4 and later, all field definitions in the schema are validated and must be DSE Search compatible, even if the fields are not indexed, have docValues applied, or used for copy-field source.
    • The default behavior of automatic resource generation includes all columns. To improve performance, take action to prevent the fields from being loaded from the database to the indexing path. In the schema, remove or comment out unused fields.
    • All unique key elements must be indexed in the Solr schema. To verify unique key elements, review schema.xml to ensure that all unique key fields must have indexed=true.

    • If you changed the schema, do a full reindex.
  6. Back up the configuration files to a folder that is not in the directory where you normally run commands.

    The configuration files are overwritten with default values during installation of the new version.

    You can use OpsCenter 6.5 Lifecycle Manager (LCM) to clone a configuration profile and run an upgrade job on a datacenter or node. Upgrade jobs are supported for upgrades within a DSE release series for DSE 5.0.x and later.

  7. Run nodetool repair to ensure that data on each replica is consistent with data on other nodes.

Upgrade steps

The upgrade process for DataStax Enterprise provides minimal downtime (ideally zero). During this process, upgrade and restart one node at a time while other nodes continue to operate online. With a few exceptions, the cluster continues to work as though it were on the earlier version of DataStax Enterprise until all of the nodes in the cluster are upgraded.

Tip: The DataStax installer automatically performs many upgrade tasks.
  1. If you have the OpsCenter Repair Service configured, turn off the Repair Service.
  2. Upgrade order matters. Upgrade nodes in this order:
    • In multiple datacenter clusters, upgrade every node in one datacenter before upgrading another datacenter.
    • Upgrade the seed nodes within a datacenter first.
    • Upgrade nodes in this order:
      1. DSE Analytics datacenters
      2. Transactional/DSE Graph datacenters
      3. DSE Search datacenters
  3. Run nodetool drain to flush the commit log of the old installation:
    nodetool -h hostname drain 

    This step saves time when nodes start up after the upgrade, and prevents DSE Search nodes from having to reindex data.

  4. Stop the node.
  5. Use the appropriate method to install the new product version.
  6. To configure the new product version:
    1. Compare your backup configuration files to the new configuration files:
    2. Merge the applicable modifications into the new version.
  7. When upgrading DSE to versions earlier than 5.1.16, 6.0.8, or 6.7.4 inclusive, if any tables are using DSE Tiered Storage, remove all txn_compaction log files from second-level tiers and lower. For example, given the following dse.yaml configuration, remove txn_compaction log files from /mnt2 and /mnt3 directories:
                - paths:
                    - /mnt1
                - paths:
                    - /mnt2
                - paths:
                    - /mnt3

    The following example removes the files using the find command:

    find /mnt2 -name "*_txn_compaction_*.log" -type f -delete &&
    find /mnt3 -name "*_txn_compaction_*.log" -type f -delete
    Warning: Failure to complete this step may result in data loss.
  8. Start the node.
  9. Verify that the upgraded datacenter names match the datacenter names in the keyspace schema definition:
    nodetool status
  10. Review the logs for warnings, errors, and exceptions.

    Warnings, errors, and exceptions are frequently found in the logs when starting an upgraded node. Some of these log entries are informational to help you execute specific upgrade-related steps. If you find unexpected warnings, errors, or exceptions, contact DataStax Support.

  11. Repeat the upgrade and restart on each node in the cluster following the recommended upgrade order as described in 2.

    Upgrading and restarting each node is called a rolling restart.

  12. After the new version is installed on each node, DataStax recommends upgrading the SSTables on each node.

    Upgrading SSTables is recommended for optimal performance, but is not required for patch releases.

    nodetool upgradesstables

    If the SSTables are already on the current version, the command returns immediately and no action is taken.

    Use the --jobs option to set the number of SSTables that upgrade simultaneously. The default setting is 2, which minimizes impact on the cluster. Set to 0 to use all available compaction threads. For information about nodetool upgradesstables, including how to speed it up, see the DataStax Support KB article Nodetool upgradesstables FAQ.

  13. DSE Search on DSE 5.1.6 and later Slow startup on nodes with large encrypted indexes is resolved. However, action is required to realize the performance gains. You must do a full reindex of all encrypted search indexes on each node in your cluster. Plan sufficient time after the upgrade is complete to reindex with deleteAll=true in a rolling fashion. For example:
    dsetool reload_core keyspace_name.table_name distributed=false reindex=true deleteAll=true 
  14. DSE Search Index time boost support is removed in DSE 5.1.1 and later. Use query time boosting instead. Delete any _docBoost columns in backing CQL tables.

    Thrift tables where the _docBoost column existed will be allowed, but the _docBoost will be ignored. Thrift tables are not able to drop the column.

  15. This step applies only to upgrades from DSE 5.1.0-5.1.2 to 5.1.3 and later DSE 5.1.x patch releases:
    To continue running incremental repairs, use nodetool repair -inc.
    Important: To migrate away from incremental repairs to enable non-incremental full (-full) or partition (-pr) repair, you must set all SSTables on all nodes as unrepaired using nodetool mark_unrepaired before running your first repair after upgrading.
  16. If you use the OpsCenter Repair Service, turn on the Repair Service.