---
title: "Special upgrade to Database 6.1.0"
description: "Special upgrade guide for Aerospike Database 6.1.0 covering sindex name limits and namespace indexing changes."
---

# Special upgrade to Database 6.1.0

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

## Important pre-upgrade considerations

Always review the special upgrade instructions of the interim server releases between the current version of your cluster and the target version.

-   Before you upgrade from Aerospike Database 4.9.0 or 5.x.y.z, follow the instructions in [Storage format upgrade in 6.0.0 Release](https://aerospike.com/docs/database/8.1.2/advanced/special-upgrades/600-upgrade).
    
-   Back up `/opt/aerospike/smd/security.smd` in your system metadata (SMD) [Directory Structure](https://aerospike.com/docs/database/8.1.2/manage/database/directory-structure#run-time-directories) and `aerospike.conf`, the Aerospike configuration file.
    
-   Find and fix any secondary index (sindex) names that are [longer than 64 characters.](#secondary-index-name-limit-reduced-to-64-characters)
    
    -   An alternative is to set up another cluster, but this is not the most common way to upgrade your system. For more details see [How to Migrate Data from an existing Aerospike Cluster to an empty Cluster](https://support.aerospike.com/hc/en-us/articles/49939296967963-How-to-Migrate-Data-from-an-existing-Aerospike-Cluster-to-an-empty-Cluster).

## Secondary Index name limit reduced to 64 characters

Starting in Database 6.1.0, secondary index (sindex) names are limited to 64 characters - down from 256. The server does not create any sindex that exceeds the limit, and logs a warning.

### Mitigation - Find and fix sindex names that are too long

Before you upgrade, find any secondary index names that exceed the new 64-character limit (including a null terminator), delete them, then recreate the sindex with a shorter name after the upgrade

Example

```plaintext
Admin+> show sindex

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Secondary Indexes (2022-08-12 00:36:08 UTC)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                                                       Index Name|Namespace| Set| Bin|    Bin|  Index|State

                                                                 |         |    |    |   Type|   Type|

age-index                                                        |test     |demo| age|NUMERIC|DEFAULT|RW

this_sindex_name_is_over_64_characters_and_fail_being_made_in_6.1|test     |demo|name|STRING |DEFAULT|RW

Number of rows: 2

Admin> manage sindex delete this_sindex_name_is_over_64_characters_and_fail_being_made_in_6.1 ns test

Successfully deleted sindex this_sindex_name_is_over_64_characters_and_fail_being_made_in_6.1.

Admin> manage sindex create string name-idx ns test set demo bin name

Successfully created sindex name-idx.

Admin+> show sindex

~~~~Secondary Indexes (2022-08-12 00:39:06 UTC)~~~~

    Index|Namespace| Set| Bin|    Bin|  Index|State

     Name|         |    |    |   Type|   Type|

age-index|test     |demo| age|NUMERIC|DEFAULT|RW

name-idx |test     |demo|name|STRING |DEFAULT|RW

Number of rows: 2
```

## Secondary Index without a set name now indexes the entire namespace

A sindex defined without a set name indexes the entire namespace, not just records without a set name (the _null set_). This adds the ability to index the entire namespace, and is another step to normalize primary index (PI) and secondary index (SI) queries.

::: caution
This change may require you to change your applications.
:::

Example: Add sindex without a set name

```plaintext
Admin+> manage sindex create numeric last-updated ns test bin updated

Successfully created sindex last-updated.

Admin+> show sindex

~~~~~~~Secondary Indexes (2022-08-12 00:42:05 UTC)~~~~~~~

  Index Name|Namespace| Set|    Bin|    Bin|  Index|State

            |         |    |       |   Type|   Type|

last-updated|test     |NULL|updated|NUMERIC|DEFAULT|RW

age-index   |test     |demo|    age|NUMERIC|DEFAULT|RW

name-idx    |test     |demo|   name|STRING |DEFAULT|RW

Number of rows: 3
```

-   In Database 6.1.0 and later, a query against the last-updated secondary index will return all the records in the namespace.
    
-   Prior to Database 6.1.0, a query against the last-updated secondary index only returns records in the null set (records not belonging to any set), meaning the records of set `demo` do not appear in the query results.