opensearch-project / opensearch-project/OpenSearch

[BUG] Cannot restore snapshots between patch versions of OpenSearch

Open
#20,002 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Storage:Snapshots
Dominant language
Java
Stars
13.7k
Forks
3k
Avg merge
2d 23h
Merged PRs (30d)
108

Description

Describe the bug

Hi,
I have a use case where we want to restore the snapshot of OpenSearch between 2 patch version of OpenSearch. But constantly getting this error:

{"error":{"root_cause":[{"type":"snapshot_restore_exception","reason":"[<SnapshotName>] the snapshot was created with OpenSearch version [1.3.11] which is higher than the version of this node [1.3.2]"}],"type":"snapshot_restore_exception","reason":"[<SnapshotName>] the snapshot was created with OpenSearch version [1.3.11] which is higher than the version of this node [1.3.2]"},"status":500}
Related component

Storage:Snapshots

To Reproduce
  1. Create an index in OpenSearch version 1.3.11
  2. Take a snapshot and then restore the snapshot on a cluster with 1.3.2 version.
Expected behavior

The expectation is snapshot should just work out of the box since the version is the patch version

Additional Details

Code reference from where exception is coming.

https://github.com/opensearch-project/OpenSearch/blob/6966267722419e7a478305313c0ddaafd37213ee/server/src/main/java/org/opensearch/snapshots/RestoreService.java#L1322-L1332

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the version check in server/src/main/java/org/opensearch/snapshots/RestoreService.java at lines 1322-1332. Reproduce the snapshot created on OpenSearch 1.3.11 and restored on 1.3.2, then trace how patch-version differences are handled. Done means the expected compatibility behavior is covered and the restore result matches the issue's expectation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.