Why are there redundant timestamped indexes on OpenSearch?

Still need help?

The Atlassian Community is here for you.

Ask the community

Summary

Confluence uses index aliases to maintain uptime when rebuilding the index, by suffixing a timestamp to the underlying index. For instance confluence-content, is an alias for the underlying index confluence-content_1718330274439.

Normally, there will only be one physical (timestamped) index for each logical Confluence index. But in some situations, you may see duplicate indexes — for instance, on the OpenSearch dashboard — as seen below:

The OpenSearch dashboard displaying two timestamped indexes.

This KB outlines two situations when you may see redundant timestamped indexes on OpenSearch, and how to resolve them.

The index is currently being rebuilt

If Confluence is rebuilding the index, you can expect to see two timestamped copies of your Confluence index in OpenSearch, and this is normal.

This is because Confluence performs reindexing with the blue-green approach. That means Confluence runs the indexing process on a new index while the existing index remains in place so that Confluence can maintain normal search functionality. For this reason, before rebuilding your index, make sure you have at least twice the disk capacity of your total index size to accommodate this blue-green process.

Resolution: No action needed. At the completion of the reindexing process, Confluence will automatically delete the old index. For more information about the reindexing process, see Content Index Administration.

The index is not currently being rebuilt

If you see duplicate indexes on OpenSearch while Confluence is not rebuilding the index, some of them are unused and should be deleted. This may happen if Confluence has failed to delete the index during a previous reindex. For instance, OpenSearch does not allow index deletion when snapshotting is taking place, so duplicate indexes may appear if OpenSearch was performing a scheduled snapshotting during reindexing.

When Confluence fails to delete an unused index, it will log an error such as:

Failed to delete old indices confluence-content_1718086759845. Delete them manually to reclaim disk space

Or in another case:

Failed to discard staging index confluence-content_1718086759845. Delete them manually to reclaim disk space

You can also view an unused index by comparing it with the Aliases view on your OpenSearch dashboard. In the example screenshots below, you can see that confluence-content_1718086759845 is unused because it is not assigned to the confluence-content alias.

The Indices view on the OpenSearch dashboard.

The Aliases view on the OpenSearch dashboard

Resolution

Unused indexes don't cause any harm, but they take unnecessary disk space on your data nodes. You can delete them manually to reclaim that disk space.

To delete them via the OpenSearch dashboard:

  1. Go the the Indices view on your OpenSearch dashboard.

  2. From the list of indexes, select the index you wish to delete.

  3. Select Actions, then Delete

Alternatively you can delete unused indexes using the REST API. See the Delete index page for more information.

Last modified on Jul 3, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.