opensearch-project / opensearch-project/OpenSearch
[BUG] Cannot restore snapshots between patch versions of OpenSearch
Nobody has claimed this yet.
- 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
- Create an index in OpenSearch version 1.3.11
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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